While Loop goes to debug

2 次查看(过去 30 天)
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!

采纳的回答

Ayush Gupta
Ayush Gupta 2020-10-6
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by