Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Standalone real windows program by MATLAB
Date: Tue, 5 May 2009 14:57:01 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 27
Message-ID: <gtpk3t$ifr$1@fred.mathworks.com>
References: <gtj8td$pp0$1@fred.mathworks.com> <gtln89$5d6$1@fred.mathworks.com> <gtmnnj$n5s$1@fred.mathworks.com> <gtof8h$bnk$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1241535421 18939 172.30.248.37 (5 May 2009 14:57:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 5 May 2009 14:57:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1296851
Xref: news.mathworks.com comp.soft-sys.matlab:537570


"Bindubritta Acharjee" <bindubritta@hotmail.com> wrote in message <gtof8h$bnk$1@fred.mathworks.com>...
> Dear Doke,
> 
> Thank you very much for your reply. Al last someone replied. I thought &#8211; no one will response about it.
> 
> Anyway, I made magic_test.m file as &#8211;
> 
> a=magicsquare(5);
> pause(10);
> 
> The dos .exe file executed, showed the magic square and closed after 10 seconds automatically. But the .exe file by &#8216;Window Standalone Application&#8217; showed no response.
> 
> Please tell, is it possible at all to get &#8216;Windows Standalone Application&#8217; by MATLAB complier (using Microsoft Visual C++ 8.0 as default compiler) without any modification in respective .m file? If it gives, required real windows output (sound, message/dialogue box) in MATLAB then why it need further modification? MATLAB will modify the .m code as needed. If I have to change, then I think &#8211; it will be better to learn Visual C++/Basic etc. rather than MATLAB.
> 
> Best regards,
> Bindubritta

With Windows Standalone Application, you will not see any outputs that go to standard out (on windows it is equivalent to the DOS window). Use GUI components like msgbox instead to show output to users. 

For example:

magic_test.m
a=magicsquare(5);
msgbox(num2str(a))


Compiling and running the above code as a Windows Standalone application will show a message box with the magic square. This message box will stay up until you hit the OK button. Note that you did not have to use PAUSE.