console application Vs Stand alone application

9 views (last 30 days)
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

Answers (1)

Image Analyst
Image Analyst on 19 Apr 2015
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 Comments
Vishal Chouhan
Vishal Chouhan on 2 Mar 2020
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 on 2 Mar 2020
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.

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!