Plotting two lines
Ältere Kommentare anzeigen
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--')
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Reference Applications finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!