PDA

View Full Version : exit function in matlab


MaxManus
Sep23-09, 12:59 PM
How do you tell matlab to exit a function with an if test in matlab?
I have tried
if x > 0
exit/quit
,but I dont want to exit matlab only the function

jamesrc
Sep24-09, 01:21 AM
try "return" to exit the function - hopefully that is what you are looking for.

MaxManus
Sep25-09, 03:29 AM
Thanks