How to make step by step inspection for loops

9 次查看(过去 30 天)
Hello!
I am in a big trouble with my matlab code, which is full of 'for' loops. The thing that would be really helpful for me, if it was possible to make a step-by-step inspection, which would show that "where" is the program at the moment, and if I press a button, or click, or whatever, then it continues to the next step. (it would be even better, if the variables would be shown, and its actual value)
So that I would be sure, that the for loops works perfectly, and it ends when is should, and so.
My question, is that is it possible, to make such an inspection for my program? It would be really helpful.
Thanks in advance (a lot)!
(Anyway, I did search for such a question here, but couldn't find any solution.)

采纳的回答

the cyclist
the cyclist 2014-5-2
编辑:the cyclist 2014-5-2
I think looking at the "Examples and How To" section of this page on debugging will be very helpful to you. In particular, learning about setting breakpoints in your code (where you can stop and check on the values of all variables) sounds like it will help you.
  1 个评论
Boros
Boros 2014-5-9
Thank you very much for your suggestion. Breakpoints actually helped, but the best thing was to write my code into a script. That's where breakpoints help. :)

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by