osx - MATLAB script does not terminate on Mac -



osx - MATLAB script does not terminate on Mac -

i running on matlab 2014a, , command line not return.

a = 0; while (1) = + 1; if (a ~= 2) continue; end; end;

there no response when control-c or command-. (or other mutual combination of keyboard keys). how can script terminate?

instead of "continue", seek "break".

here's reasoning:

"continue" temporarily interrupts execution of programme loop, skipping remaining statements in body of loop current pass only.

so doesn't exit loop completely, skips remaining code in loop , re-evaluates status of while loop, in case is true.

in contrast, break exits loop completely.

another way go rewrite loop statement, example:

a = 0; while a~=2 = + 1; end

not sure why wouldn't cease running ctrl-c though. expect script has run such long time machine might getting progressively less responsive. hinted article: http://www.mathworks.com/help/matlab/matlab_env/stop-execution.html

osx matlab terminate

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -