Creating a GUI based on user inputs
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
- 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).
- 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:
- Use 'figure' command to create a gui. Its size will be determined by num_run and num_para
- Somehow for-loop the below in order to have the same number of sections as num_run
- Use 'uipanel' command to add a panel whose size is determined by num_para
- Use 'uicontrol' command to add text boxes. One of them is editable so that a description can be typed in.
- Use 'uitable' command to add a table whose size is determined by num_para
- 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 comentario
Geoff Hayes
el 28 de En. de 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.
Respuestas (0)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!