MATLAB Exit Function in MATLAB: If Test Logic

  • Thread starter Thread starter MaxManus
  • Start date Start date
  • Tags Tags
    Function Matlab
MaxManus
Messages
268
Reaction score
1
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 don't want to exit MATLAB only the function
 
Physics news on Phys.org
try "return" to exit the function - hopefully that is what you are looking for.
 
Thanks
 

Similar threads

Replies
2
Views
3K
Replies
32
Views
4K
Replies
5
Views
3K
Replies
1
Views
3K
Replies
4
Views
1K
Replies
5
Views
2K
Back
Top