console application Vs Stand alone application
조회 수: 12 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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
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
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 Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!