How to draw a vertical line with a given height?

47 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by