How to draw a vertical line with a given height?

47 ビュー (過去 30 日間)
Lilllly
Lilllly 2016 年 5 月 4 日
回答済み: CS Researcher 2016 年 5 月 4 日
I use
line([1 1]*posx)
to draw a vertical line in a figure. Can I also draw a vertical line with a specific height?

採用された回答

CS Researcher
CS Researcher 2016 年 5 月 4 日
For a line from (x,y) to (x,y+height), Use this:
line([x x], [y y+height]);
From origin it could just be
line([0 0], [0 height]);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by