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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook