Why plotting the first derivative of my function gets shrinked on its amplitud?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
x = linspace(-2*pi,2*pi,100); y1 = sin(x); y2 = diff(y1); figure plot(y2);
0 Commenti
Risposte (1)
Jan
il 25 Set 2017
Modificato: Jan
il 25 Set 2017
What is the derivative of sin(a * t)?
a * cos(a * t)
Try it:
x = linspace(-2*pi, 2*pi, 100);
y1 = sin(x);
y2 = diff(y1);
figure
plot(x, y1, 'r');
hold('on');
plot(x, y2, 'g');
x2 = linspace(-2*pi, 2*pi, 200); % Time with double resolution
y3 = sin(x2);
y4 = diff(y3);
plot(x2, y4, 'b')
0 Commenti
Vedere anche
Categorie
Scopri di più su Animation in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!