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!
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!