plot function in matlab?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Najmeh Eskandari
le 5 Août 2018
Commenté : Jan
le 5 Août 2018
I want to plot qi=q0+3*(qf-q0)*t^2-2*(qf-q0)*t^3 as defined in the picture.i use plot or ez plot but the figure that is drawn is not correct.
q0=10(degree)
qf=-20(degree)
t=0 to 1 second
2 commentaires
KALYAN ACHARJYA
le 5 Août 2018
Modifié(e) : KALYAN ACHARJYA
le 5 Août 2018
Check the answer, I have edited. Pls confirm?
Jan
le 5 Août 2018
@Najmeh Eskandari: Please post your code and the output. Then explain what "not correct" means, such that we can give you an advice how to improve your code.
Réponse acceptée
KALYAN ACHARJYA
le 5 Août 2018
Modifié(e) : KALYAN ACHARJYA
le 5 Août 2018
q_o=10;
qf=-20;
t=0:.1:1;
qi=q_o+3*(qf-q_o)*t.^2-2*(qf-q_o)*t.^3;
plot(t,qi);
title('Cubic Polynomial Trajectory');
xlabel('Time(sec)'); ylabel('Angle(deg)');
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!