MATLAB Answers


Hi, How can i put the command window in a GUI?

Asked by Diego Hernandez on 21 Aug 2019
Latest activity Commented on by Adam Danz
on 23 Aug 2019
I want the command window to show itself as a section in the GUI.


Diego - are you wanting to give the user the ability to enter MATLAB commands into your GUI? I think that you might have to create your own command-like window using an edit text box...
on 23 Aug 2019
Letting the user run arbitrary code seems like a bad idea.
With a text box the code will not be executed until something invokes the GUI to read in the text and do an eval() or evalin(). Error messages, warnings, and outputs could be channeled to appear the pseudo-command-window. But I'd bet that it wouldn't be trivial. That might also require using multiple workspaces and sharing variables between them which sounds clumsy, too. If the commands that need to be entered are simple, there are much better solutions that immitating a command window from the GUI.

Sign in to comment.


0 Answers