Plotting two lines
古いコメントを表示
Im trying to plot an orbit and a line over the fixed point, but with the code i wrote, it only plots the orbit curve. what am i doing wrong?
function speed(v,h);
N=200/.01;
for n=[1:N-1];
v(n+1)=v(n)+.01/20*(-.5*v(n)+h);
end
plot(v);hold on
plot(h/.5,'r--')
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Reference Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!