While Loop goes to debug

2 views (last 30 days)
Liam Crocker
Liam Crocker on 1 Oct 2020
Answered: Ayush Gupta on 6 Oct 2020
So I have the functions to find area and Drag, got them down pat fine and I know they are correct or extremly close to the correct values by the info given underneath the formula. The Drag constant just follows the area in a similar fashion so I know thats pretty close to correct..
It gives me a those global variables listed below, the only thing I changed was h0 to meters. (I have the same problem be it 2.5 or 2500). In the etc part I'm meant to input the formula's in that order. No worries, V and ax are already given so I have put a faint line through them. I then input the rest of the formula's into the while loop that was given to me in the question. Due to T being a very small incrememnt I know i'm meant to get around 700 or so values, but instead I get about 5 and the script goes to debugging. All I have done is create the area, drag and input the formula's.
The first values the loop gives me seem to be correct, 0 or close to and it one case 50. So I run the script and it doesn't "end" I have to pause it and then quit debugging twice. The orangey text it gives me (which i assume is the debug?) is not something I've ever come across or understand. If anyone has any suggestions on how to get this script running that would be amazing!
Thank you so much in advance, I'm learning lots!

Accepted Answer

Ayush Gupta
Ayush Gupta on 6 Oct 2020
The script is working fine and does not go into debugging mode on 2019b version. To refer to how to use while loop and its documentation, look here.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!