Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Exit function in matlab

  1. Sep 23, 2009 #1
    How do you tell matlab to exit a function with an if test in matlab?
    I have tried
    if x > 0
    ,but I dont want to exit matlab only the function
  2. jcsd
  3. Sep 24, 2009 #2


    User Avatar
    Science Advisor
    Gold Member

    try "return" to exit the function - hopefully that is what you are looking for.
  4. Sep 25, 2009 #3
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Exit function in matlab
  1. MATLAB function (Replies: 2)

  2. Matlab function (Replies: 1)

  3. Matlab functions (Replies: 0)

  4. Matlab functions (Replies: 0)

  5. MATLAB function (Replies: 1)