MATLAB Answers

How to break out of loop when debugging?

13 views (last 30 days)
Hao Sun
Hao Sun on 15 Apr 2020
I tried using the break statement, but I just get a Error: A BREAK statement appeared outside of a loop. Use RETURN instead. error despite the fact that I am definitely inside a while loop right now.

  1 Comment

Sign in to comment.

Answers (1)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi on 21 Apr 2020
Hi,
If you are trying to know how to come out of a loop while debugging, you could just place a breakpoint just below the loop and click on continue(F5).
As far as the error is concerned, you might have probably missed or misplaced an 'end'.

  0 Comments

Sign in to comment.

Products


Release

R2020a