Path: news.mathworks.com!not-for-mail
From: "Todd Welti" <twelti@harman.com>
Newsgroups: comp.soft-sys.matlab
Subject: how to stop execution
Date: Wed, 11 Mar 2009 21:03:00 +0000 (UTC)
Organization: Harman Industries International
Lines: 3
Message-ID: <gp98u4$g9h$1@fred.mathworks.com>
Reply-To: "Todd Welti" <twelti@harman.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1236805380 16689 172.30.248.37 (11 Mar 2009 21:03:00 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 11 Mar 2009 21:03:00 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 57524
Xref: news.mathworks.com comp.soft-sys.matlab:524159


This might seem like a dumb question, but how do you stop code execution?  I dont mean 'return', or 'dbstop', or 'error'.  I just want to stop the code immediately, with no fanfare and just return to the command line.  Strangley enough, i can't seem to find a command that does this!  "Return" doesn't necessarily work if the current function is not the main function. "dbstop" puts it in debug mode.  "quit" quits matlab.

I've looked and looked and can't find this simple command.