theta = linspace(0,2*pi,200); y = theta;x = 10;plot(x,y,'o');
当我写这篇文章时,我得到了点,但是当我用plot(x,y)替换plot(x,y,'o')时,我应该在x = 4处得到一条垂直线,但是图形变为空。 / p>
答案 0 :(得分:2)
答案 1 :(得分:1)
从此答案开始:https://it.mathworks.com/matlabcentral/answers/2031-adding-vertical-line-to-plot
fig=figure;
hax=axes;
x=0:0.1:10;
hold on
plot(x,sin(x))
SP=1; %your point goes here
line([SP SP],get(hax,'YLim'),'Color',[1 0 0])