why won't this plot?
古いコメントを表示
for i = 1:length(xaxis); if xaxis(i) >0; plot(xaxis(i),yaxis(i)); end
end;
xaxis and yaxis have numbers. I always get a blank plot space
採用された回答
その他の回答 (3 件)
Massimo Zanetti
2016 年 10 月 4 日
Yes, because you are plotting just on point. Better try this:
plot(xaxis,yaxis)
Gareth Thomas
2016 年 10 月 4 日
編集済み: Gareth Thomas
2016 年 10 月 4 日
You need to add the hold on command. Try this:
for i = 1:length(xaxis); hold on;if xaxis(i) >0; plot(xaxis(i),yaxis(i),'x'); end; end;
Notice the 'x' which helps you see it.
Gareth Thomas
2016 年 10 月 4 日
for i = 1:length(xaxis); hold on ;if xaxis(i) >0; plot(xaxis(i),yaxis(i),'x'); end; end;
カテゴリ
ヘルプ センター および File 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!