<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869</link>
    <title>MATLAB Central Newsreader - Simple Problem - Command Prompt</title>
    <description>Feed for thread: Simple Problem - Command Prompt</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 03 Nov 2009 19:16:05 -0500</pubDate>
      <title>Simple Problem - Command Prompt</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869#691809</link>
      <author>Ahmad </author>
      <description>The problem is that when a final result is obtained the comand prompt closes immediately and I can't se the result. What command can I use so that command prompt doesn't close after the calculations?</description>
    </item>
    <item>
      <pubDate>Tue, 03 Nov 2009 20:56:37 -0500</pubDate>
      <title>Re: Simple Problem - Command Prompt</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869#691838</link>
      <author>jrenfree</author>
      <description>On Nov 3, 11:16&#160;am, &quot;Ahmad &quot; &amp;lt;climbe...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; The problem is that when a final result is obtained the comand prompt closes immediately and I can't se the result. What command can I use so that command prompt doesn't close after the calculations?&lt;br&gt;
&lt;br&gt;
What do you mean the command prompt closes?  Does Matlab completely&lt;br&gt;
shut down?  By command prompt do you mean the Command Window?</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 12:03:02 -0500</pubDate>
      <title>Re: Simple Problem - Command Prompt</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869#692008</link>
      <author>Ahmad </author>
      <description>I mean th command prompt which opens in which the code is executed when the exe is created from the m-file. I mean the command prompt environment in which the exe opens. Once it computes the results it closes immediately! How should I make it remain open?</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 13:48:01 -0500</pubDate>
      <title>Re: Simple Problem - Command Prompt</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869#692033</link>
      <author>ImageAnalyst</author>
      <description>On Nov 4, 7:03&#160;am, &quot;Ahmad &quot; &amp;lt;climbe...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I mean th command prompt which opens in which the code is executed when the exe is created from the m-file. I mean the command prompt environment in which the exe opens. Once it computes the results it closes immediately! How should I make it remain open?&lt;br&gt;
&lt;br&gt;
------------------------------------------------------------------------------------------------------------------------------------&lt;br&gt;
You need to open a command window and run your exe from there.  If you&lt;br&gt;
just double click the icon, it will open the command window briefly,&lt;br&gt;
crash and dump the error message to it, and then (unfortunately) shut&lt;br&gt;
down that window.  This is what you're experiencing.&lt;br&gt;
&lt;br&gt;
If you open a separate command window manually (say with Start/Run/cmd&lt;br&gt;
in Windows XP), change directory to the folder, and run the program,&lt;br&gt;
the window won't shut down and any error messages will remain in view.&lt;br&gt;
&lt;br&gt;
Or alternatively run it from the command window panel in MATLAB with&lt;br&gt;
the ! operator, like this:&lt;br&gt;
!myapp&lt;br&gt;
Then the error messages will remain in the MATLAB command window.</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 14:18:19 -0500</pubDate>
      <title>Re: Simple Problem - Command Prompt</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264869#692046</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;ImageAnalyst&quot; &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message &lt;br&gt;
news:398467f9-9532-4eee-9959-a00cd35e2836@r5g2000yqb.googlegroups.com...&lt;br&gt;
&amp;gt; On Nov 4, 7:03 am, &quot;Ahmad &quot; &amp;lt;climbe...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; I mean th command prompt which opens in which the code is executed when &lt;br&gt;
&amp;gt; &amp;gt; the exe is created from the m-file. I mean the command prompt&lt;br&gt;
&amp;gt; environment in which the exe opens. Once it computes the results it closes &lt;br&gt;
&amp;gt; immediately! How should I make it remain open?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ------------------------------------------------------------------------------------------------------------------------------------&lt;br&gt;
&amp;gt; You need to open a command window and run your exe from there.  If you&lt;br&gt;
&amp;gt; just double click the icon, it will open the command window briefly,&lt;br&gt;
&amp;gt; crash and dump the error message to it, and then (unfortunately) shut&lt;br&gt;
&amp;gt; down that window.  This is what you're experiencing.&lt;br&gt;
&lt;br&gt;
I don't think there's any crash involved.&lt;br&gt;
&lt;br&gt;
When you run a function in MATLAB, once the function has finished executing, &lt;br&gt;
you return to the command prompt.&lt;br&gt;
When you run a function in a compiled application, once the function has &lt;br&gt;
finished executing, the compiled application exits.  As part of the process &lt;br&gt;
of exiting, the application must close down any windows it created.&lt;br&gt;
&lt;br&gt;
&amp;gt; If you open a separate command window manually (say with Start/Run/cmd&lt;br&gt;
&amp;gt; in Windows XP), change directory to the folder, and run the program,&lt;br&gt;
&amp;gt; the window won't shut down and any error messages will remain in view.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Or alternatively run it from the command window panel in MATLAB with&lt;br&gt;
&amp;gt; the ! operator, like this:&lt;br&gt;
&amp;gt; !myapp&lt;br&gt;
&amp;gt; Then the error messages will remain in the MATLAB command window.&lt;br&gt;
&lt;br&gt;
Those are two options; alternately, use UIWAIT on the handle of a MSGBOX so &lt;br&gt;
that the function doesn't finish executing until the dialog is closed.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
  </channel>
</rss>

