How to make an array which plots certain points if another column has a certain value?
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Hey,
I have two arrays in which the velocity and the corresponding position of a point are noted. If the velocity is zero, the position of that point has to be plotted. If the velocity is not zero, the position of that point should not be plotted.
Does anybody know how to do this?
Thanks!
0 件のコメント
回答 (1 件)
dpb
2019 年 5 月 27 日
"Logical addressing"...
isv=(v~=0); % the logical addressing vector for v
plot(p(isv)) % plot the points (vs ordinal number)
plot(v(isv),p(isv)) % plot the points (vs velocity at point)
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!