How to draw x=2 line using plot command

10 次查看(过去 30 天)
I want to draw the vertical line x=2. I want to draw it by using plot command in x-y plane, x-is the horizontal axis. How to draw it?
I do not want to use the following
line([2 2], [0 10])
to draw a line from (2,0) to (2,10)

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-15
编辑:Azzi Abdelmalek 2013-2-15
plot([2 2], [0 10])
%or maybe you want
plot([2 2],ylim)

更多回答(1 个)

ToLos Mil
ToLos Mil 2013-2-15
See the answer given at the following link

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by