Creating a GUI based on user inputs

8 views (last 30 days)
Eric Hong
Eric Hong on 27 Jan 2015
Commented: Geoff Hayes on 28 Jan 2015
Hi,
I am trying to write a script that creates a gui based on an initial set of user inputs and retrieve data from the created gui on which the user further provide some more information.
I don't know where to begin and having researched and studied for about two days (I am almost complete new to gui development), I am frustrated as I still don't know where to begin. Your help will be greatly appreciated.
The below is the scenario. The bottom-line is that I want to run a simulation multiple times with different user-specified parameter values.
  1. Collect data for the number of times to run the simulation (num_run) and the number of parameters (num_para) to modify (either from anoter gui, which I already have created, or the command window).
  2. Create a second gui based on those information. I want to have the same number of sections (panels) as num_run. Each section then will have a editable table with two columns for parameter name and new value; and the same number of rows as num_para. I also want for each section to have an editable text box on the top where a short description (ID) of each simulation run is typed.
Then the requirement is to be able to retrieve the data from the 2nd gui (the same number of data sets as num_run and they are sorted by the ID's) so that I can search the parameters in the model and change the default values to the specified and gather the simulation data labeled by the ID's.
A general scheme based on my painful research I have in mind is:
  1. Use 'figure' command to create a gui. Its size will be determined by num_run and num_para
  2. Somehow for-loop the below in order to have the same number of sections as num_run
  3. Use 'uipanel' command to add a panel whose size is determined by num_para
  4. Use 'uicontrol' command to add text boxes. One of them is editable so that a description can be typed in.
  5. Use 'uitable' command to add a table whose size is determined by num_para
  6. Gather data back in a structure format
I need a good starting point to create this code sine I am completely lost at the moment.
Many thanks in advance,
Eric
  1 Comment
Geoff Hayes
Geoff Hayes on 28 Jan 2015
Eric - have you tried to use GUIDE to create your first GUI? Check the link (with videos) at http://www.mathworks.com/discovery/matlab-gui.html.

Sign in to comment.

Answers (0)

Categories

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

Products

Community Treasure Hunt

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

Start Hunting!