<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240757</link>
    <title>MATLAB Central Newsreader - Closing DOS window from matlab</title>
    <description>Feed for thread: Closing DOS window from matlab</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>Fri, 06 Mar 2009 15:53:01 -0500</pubDate>
      <title>Re: Closing DOS window from matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240757#633060</link>
      <author>Jeroen </author>
      <description>Hi Quentin,&lt;br&gt;
&lt;br&gt;
Just came across a similar issue. I solved it using a trick; made a .bat file which contains the following two lines:&lt;br&gt;
&lt;br&gt;
yourprogram.exe&lt;br&gt;
exit&lt;br&gt;
&lt;br&gt;
If you call the .bat file from Matlab in the same way you would start a normal executable, the .exe will be run in a dos window, which should now close after the .exe has finished. I have no experience with the dde library, however.&lt;br&gt;
&lt;br&gt;
Jeroen</description>
    </item>
    <item>
      <pubDate>Wed, 10 Dec 2008 05:24:02 -0500</pubDate>
      <title>Closing DOS window from matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240757#616095</link>
      <author>Quentin </author>
      <description>Hello all,&lt;br&gt;
&lt;br&gt;
I have a quick question and my internet searches haven't quite gotten me a solution yet. Seems like a real common problem.&lt;br&gt;
&lt;br&gt;
I am running a .exe file within a for loop in matlab. I need matlab to start and stop this file each loop iteration. I can get matlab to run the code using !program.exe &amp; and then have matlab close the program by sending a command to that programs via dde. The only problem with this is that the &amp; command (which I need to give matlab access to the dde library) opens up a DOS window with each loop iteration. I need to do many loops so I would like a way to automatically close these windows within matlab. Anyone have an .m file or know of any commands I can use?&lt;br&gt;
&lt;br&gt;
Thanks a ton!&lt;br&gt;
quentin</description>
    </item>
  </channel>
</rss>

