Results 1 to 2 of 2

Math Help - How to stop execution of mat-lab program

  1. #1
    Newbie
    Joined
    Apr 2010
    Posts
    23

    How to stop execution of mat-lab program

    How can i stop the execution of a mat-lab program when a certain condition is met

    Code:
    if x>0 
    % stop execution
    end
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by AUCC View Post
    How can i stop the execution of a mat-lab program when a certain condition is met

    Code:
    if x>0 
    % stop execution
    end
    break will get you out of the current loop, or if you are in a function return will exit the function (should also work in a script file).

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. propability, train stop
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: December 6th 2011, 05:09 AM
  2. Probability that no 2 people get off at some stop
    Posted in the Statistics Forum
    Replies: 3
    Last Post: October 29th 2009, 04:16 PM
  3. Fixing The Program (Program Correctness)
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: March 21st 2009, 03:17 PM
  4. I don't know where to stop...!!!
    Posted in the Algebra Forum
    Replies: 2
    Last Post: November 28th 2008, 05:24 AM
  5. stop that bus!
    Posted in the Advanced Statistics Forum
    Replies: 17
    Last Post: July 13th 2008, 01:34 AM

Search Tags


/mathhelpforum @mathhelpforum