Plotting differential equations, need help

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by