osx - MATLAB script does not terminate on Mac -


I'm running it on MATLAB 2014a, and the command line does not return.

  a = 0; While (1) A = A + 1; If (a ~ = 2) will continue; End; End;   

There is no answer when I control - c or order -. (or any other common combination of keyboard keys). How can the script end?

Instead of "continue", try "brake".

Here's my argument:

"Continue" Temporarily, skipping any remaining statement in the body of the loop for interrupting the execution of a program loop Current pass only .

So this loop does not have to completely exit, it leaves any remaining code in the loop and then while evaluating the condition of the loop, in which case your case Always true .

On the contrary, the break exits completely out of the loop.

Another way to go about this is to make a Loop statement, for example:

  a = 0; Whereas a ~ = 2a = A + 1; End   

Not sure why it will not stop running with ctrl-c. I hope your script runs so long that your machine may be progressively less responsive to this article:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -