Why the ''break'' function does not work

조회 수: 16 (최근 30일)
Milen
Milen 2012년 11월 14일
Hello,
I have somtimes an issue when usung the 'break' function to stop the exsecution of a for loop when some sondition is achieved. Sometimes it works but sometimes it does not work and I wonder why? My be I am making some mistake.
Does anyone experienced similar issue? Do you know how to fix it?
Thank you!
Milen

답변 (2개)

C.J. Harris
C.J. Harris 2012년 11월 14일
Are you putting 'clear all' at the beginning of your scripts by any chance?
This will remove the breakpoints.
  댓글 수: 2
Ilham Hardy
Ilham Hardy 2012년 11월 14일
The function
break
is not similar as breakpoints
Jan
Jan 2012년 11월 14일
As far as I understand, Milen asks for the "break" command, not for breakpoints.

댓글을 달려면 로그인하십시오.


Jan
Jan 2012년 11월 14일
Yes, I agree that your code contains a mistake.
Matlab is a deterministic system. When the condition is met, the corresponding code is executed. If you post the code, we could search for the problem. Without seeing the code, there is no chance to guess what's going on.
  댓글 수: 1
Milen
Milen 2012년 11월 15일
Thanks everybody for the feedbacks!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by