difference between console window and desktop Command Window

This is a very simple question, but I am not so sure about it. From my point, I think they are the same thing, but when I read documentation of diary,
doc diary
there are some contents in the following about the console window and desktop command window.
Viewing the output of diary in a console window might produce different results compared to viewing diary output in the desktop Command Window.
One example is using the \r option for the fprintf function; using the \n option might alleviate that problem.
Maybe some one can tell me with a screenshot, what is the difference between them?
Thanks forward!! Xiaodi

 Respuesta aceptada

Image Analyst
Image Analyst el 3 de Sept. de 2017
Well one difference is that when you've compiled your program and run it, you get (unless you suppress it) an operating system console window that is essentially supposed to be like the command window. It needs to do that because with a compiled program the full MATLAB development environment is not there so it creates this console window for output. HOWEVER the formatting (line wrap, spacing, etc.) is controlled by the operating system rather than MATLAB so there is a possibility things might look slightly different.

3 comentarios

Hello, Thanks for the answer. So it means, the console window is set by the operating system, which like the Termial in Ubuntu. Desktop command window here points the command window of matlab, which is set by matlab itself. Sometimes matlab will run program, which is in operating system environment. Although the output is shown in matlab command window, but its rules is based on operating system. In this situation, diary dispaly these contents according to matlab rules rather than operating system. So this results in the differences of same contents between diary and command window. Is it right?
I'm not sure what you're seeing, but yes, if you're running MATLAB with no IDE, like with the nodesktop option or from a compiled program, then the "command window" will created as your Ubuntu terminal window. The appearance there may be similar but it's not guaranteed to look EXACTLY the same. For example the font will probably be different, etc.
Thank you so much!!!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Entering Commands en Centro de ayuda y File Exchange.

Preguntada:

el 3 de Sept. de 2017

Comentada:

el 3 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by