Effacer les filtres
Effacer les filtres

Getting errors with code.

2 vues (au cours des 30 derniers jours)
J
J le 24 Fév 2015
Modifié(e) : per isakson le 24 Fév 2015
Could someone help me figure out why I'm getting errors with the function I have attached. It is a trajectory function that takes the initial velocity and the angle as inputs, and the output should be an animation plot of the trajectory (kind of like angry birds.) I'm having trouble with the animation. Thank you very much.

Réponses (1)

per isakson
per isakson le 24 Fév 2015
Modifié(e) : per isakson le 24 Fév 2015
The first problem is that t is not defined before line 7, which is
[xt,yt] = trajectory(v0,theta,t,g);
Put your code aside for a moment and study Debugging, Diagnose problems with MATLAB programs

Catégories

En savoir plus sur Animation 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!

Translated by