Why does it not calculate x & y for all values of t?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Joel
le 21 Sep 2014
Réponse apportée : David Young
le 21 Sep 2014
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145474/image.png)
I'm in the process or doing some homework, and I'm trying to figure out why it only processes x and y for only one value of t. I've changed around the numbers and have noticed that it only processes x and y for the last value of t. I've had other problems where they calculate the information for all values of the given info.
Thanks in advance, and apologies if it is just a frivolous error.
0 commentaires
Réponse acceptée
David Young
le 21 Sep 2014
Your code process all the values of t - the problem is that the calls to disp are outside the loop, so they only show the values of x and y after the loop has finished. Try putting the calls to disp inside the loop, before the "end" statement.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!