Matlab: How can i stop a the whole function in matlab? -


i have function in matlab calculating something. within function open function calculate it. in second function have case want stop if condition true (so want end both functions)

i don't want error message or anything; there command that?

if type in error notice in red message such as:

error: invalid call error.  correct usage is:   -- built-in function: error (template, ...)  -- built-in function: error (id, template, ...)  error: called from: error:   /usr/share/octave/3.8.1/m/help/print_usage.m @ line 89, column 5 >>>error:   /home/john/wpq.m @ line 75, column 4 error:   /home/john/test.m @ line 23, column 21 

if write error('blabla') still get:

>>>error: blabla error: called from: error:   /home/john/wpq.m @ line 75, column 4 error:   /home/john/test.m @ line 23, column 21 

i no output because can write 1 line above disp('the test on number failed').

you try placing try/catch block in main function expect condition under want code execution stop. don't believe there 1 command allows code stop execution function within function.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -