Some basic questions on GUI

4 views (last 30 days)
Song Lee
Song Lee on 7 Oct 2013
Commented: Song Lee on 8 Oct 2013
Hello. Actually I have many questions on GUI in matlab. Could you please help me? I had experienced MFC Windows Programming but GUI in matlab is very unfamiliar to me. My questions are as follows:
Q1. If I want to add other controls on GUI after I already made a GUI and revised the code, how can I just add some controls maintaining what I wrote before?
Q2. When I saved my GUI and the code of GUI is created, do I need like a main function to revise or it is okay to write codes in the code of GUI?
Q3. I'd like to update figure drawn by imshow function on GUI whenever I change a slider control and related variable. Is there any good example to practice this?
Your help in this would be greatly appreciated in advance. Thank you.

Accepted Answer

Jan
Jan on 7 Oct 2013
Edited: Jan on 7 Oct 2013
Q1. Simply add the new element and the corresponding callback. I do not see a reason for interferences.
Q2. This is not clear. It seems like you are using GUIDE to create the GUI. This is not required. GUIDE creates a FIG file, which is actually a MAT file which contains the data of the GUI elements, and an M-file, which contains the callback functions and the main function. You do not need further code to run a GUI.
Q3. http://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-examples. Here you find all you need to create GUIs without GUIDE also.
  1 Comment
Song Lee
Song Lee on 8 Oct 2013
Thank you for your answer! I will try what you explained.

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!