How to draw a vertical line with a given height?

119 Ansichten (letzte 30 Tage)
Lilllly
Lilllly am 4 Mai 2016
Beantwortet: CS Researcher am 4 Mai 2016
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?

Akzeptierte Antwort

CS Researcher
CS Researcher am 4 Mai 2016
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]);

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by