필터 지우기
필터 지우기

Creating a GUI based on user inputs

조회 수: 15 (최근 30일)
Eric Hong
Eric Hong 2015년 1월 27일
댓글: Geoff Hayes 2015년 1월 28일
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
Geoff Hayes
Geoff Hayes 2015년 1월 28일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by