필터 지우기
필터 지우기

console application Vs Stand alone application

조회 수: 13 (최근 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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by