How to add a command window to a GUI?

조회 수: 5 (최근 30일)
Meshooo
Meshooo 2014년 8월 6일
답변: Sk Sahariyaz Zaman 2016년 4월 28일
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

답변 (1개)

Sk Sahariyaz Zaman
Sk Sahariyaz Zaman 2016년 4월 28일
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!

Translated by