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 Threads - Exit function matlab Date
Mathematica Cannot do the integral of the Hyper-geometric function? Mar 11, 2018
Mathematica Cannot Plot This Function in Mathematica Feb 26, 2018
Matlab Dotting autonomous functions Jan 24, 2018
Mathematica Piecewise Function Jan 18, 2018
How to exit a for loop Nov 24, 2011