Plotting two lines
Show older comments
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--')
Accepted Answer
More Answers (0)
Categories
Find more on Reference Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!