How can I convert a speed profile to displacement graph
Afficher commentaires plus anciens
I have a speed graph that looks like the image below. The y-axis is in (m/s) and the x-axis is in (s). To generate the plot below i made use of 3 equations and applied the fplot function
max_spd = 4;
a = 2/3; %acceleration
fplot(@(x) (a)*x,[0 6],'g')
fplot(@(y) max_spd,[6 13.75],'g');
fplot(@(x) -(a)*x + (19.75)*(a),[13.75 19.75],'g')
How can I convert this velocity-time plot to a displacement-time graph?

so far I have this,
max_spd = 4;
a = 2/3; %acceleration
fplot(@(x) 0.5*(a*x)*x,[0 6],'k');
fplot(@(x) 4*x-(0.5*4*6),[6 13.75],'k');
fplot(@(x) 0.5*(-a)*x*x+(19.75)*a*x - (4*7.75) - (0.5*6*4),[13.75 19.75],'k');
which gives me this plot, is there a better function that will allow me to plot the displacement-time plot? Or is there a better method to perform this conversion?

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
