How to make step by step inspection for loops

10 views (last 30 days)
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.)

Accepted Answer

the cyclist
the cyclist on 2 May 2014
Edited: the cyclist on 2 May 2014
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 Comment
Boros
Boros on 9 May 2014
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. :)

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!