console application Vs Stand alone application

12 ビュー (過去 30 日間)
yuri tupizin
yuri tupizin 2015 年 4 月 19 日
コメント済み: Image Analyst 2020 年 3 月 2 日
Hi , First of all I would like to understand the difference between the two , and second of all I would like to know if I can create a "console application" via code , I know I can create Stand alone application using the mcc function .
Thanks
Yuri

回答 (1 件)

Image Analyst
Image Analyst 2015 年 4 月 19 日
You need the MATLAB Compiler product to compile your m-file into a standalone program. See the FAQ: http://matlab.wikia.com/wiki/FAQ#MATLAB_Compiler_Toolbox
Your standalone program can either be a console application, like everything happens in the console (DOS) window, or a GUI application. If all your user interactions took place in the command window, when running your m-file in the MATLAB environment, then it will be a console application. If you had a user interface, like you built your app using GUIDE or any of the other functions that popped up a dialog box or figure, then it will be a GUI application. And of course it can be a mixture of both, though that would be confusing to the user if they had to input in different places. I always do GUI applications though I will put status information into the console window, particularly when the app is launching and I'm in the OpeningFcn function, since that's the only way (well, at least a good, or easy, way) to see what functions you're in and how far along you got before it crashed. Again, read the FAQ.
  3 件のコメント
Vishal Chouhan
Vishal Chouhan 2020 年 3 月 2 日
Hey. Could you please share the reference.how it can be mixture of console and gui such that I can track my logg and other stuff as display output as you said
Image Analyst
Image Analyst 2020 年 3 月 2 日
Just use console things in your GUI when you want to, like fprintf() or input(). However I think having user input on both the GUI and console window would be very aggravating for the user. Using fprintf() to print status/debugging info would be fine though, and I do that. Sometimes you just want to print stuff out there to help you should the user ever come back to you with a problem and if they can include a screenshot of the console window, it could be helpful figuring out what went wrong when they ran your program.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by