Clear Filters
Clear Filters

How to add a command window to a GUI?

8 views (last 30 days)
Meshooo
Meshooo on 6 Aug 2014
Answered: Sk Sahariyaz Zaman on 28 Apr 2016
Dear all,
I have been developing one GUI for image processing and analysis which now having many buttons, sliding bars, Axes and etc. However, sometimes I want to test the result of an operation before creating a proper function for it.
In other words, I want to click a button which will open a window where I can type a text matlab command and see the result such as:
I = getimage; % to import the current image from the axes
Z = imadjust(I) %
imshow (Z) % to show the result in the current axes or a new axes of the GUI.
Any idea how to do that?
Meshoo

Answers (1)

Sk Sahariyaz Zaman
Sk Sahariyaz Zaman on 28 Apr 2016
Hi, create a window with text box(where you will write your matlab command to see the output) and read the text line by line and execute the command text with 'eval' command and then show the same result in the same text box after your command.
chack -

Community Treasure Hunt

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

Start Hunting!