MATLAB Answers

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

3 views (last 30 days)
Diego Hernandez
Diego Hernandez on 21 Aug 2019
Commented: Adam Danz on 23 Aug 2019
I want the command window to show itself as a section in the GUI.


Geoff Hayes
Geoff Hayes on 23 Aug 2019
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...
Rik on 23 Aug 2019
Letting the user run arbitrary code seems like a bad idea.
Adam Danz
Adam Danz on 23 Aug 2019
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.

Answers (0)

Sign in to answer this question.