https://uk.mathworks.com/matlabcentral/newsreader/view_thread/152231
- ERROR command
For examle if a condition is not met:
if (A~=B)
error('------------- A and B differ -------------')
end
OR FOR-loop
https://uk.mathworks.com/help/matlab/ref/break.html
while 1 tmp = rand; if tmp > limit break end s = s + tmp; end