Plotting differential equations, need help

3 views (last 30 days)
y = diff(sin(2*pi*t))./diff(t);
plot(t,y)
Remember diff() shortens the length of your vector by one so you will need to define a new time vector to plot against. ---- how do i do this?
thank you

Accepted Answer

Yu Jiang
Yu Jiang on 6 Oct 2014
plot(t(2:end),y)
  8 Comments
Andrew
Andrew on 6 Oct 2014
its ok, i fixed it. thanks for your help sir.

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics 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!