フィルターのクリア

My First GUI: open a file, read the data, select which columns to plot, then plot it

1 回表示 (過去 30 日間)
David C
David C 2013 年 1 月 18 日
This is my first GUI build using GUIDE, please bear with me, as I have watched about a dozen tutorial videos, but have yet to have my question answered.
I have created a GUI with an axes, a push button called "select file", a listbox with parameters of interest, and another push button that says "graph".
In the "select file" button, I have successfully coded it to read the file of interest, and aggregate all the data.
My issue is how do I update/populate the listbox with the headers from the data that I read? Then after the parameter(s) of interest is/are selected, how do I get the "graph" button to generate the graph?
I think what I'm missing is understanding of how I can pass the aggregate data to other functions (which essential are other UI components right?)
All help is highly appreciated. I'm going to continue looking through tutorial videos in the mean while.

回答 (1 件)

John Petersen
John Petersen 2013 年 1 月 18 日
編集済み: John Petersen 2013 年 1 月 18 日
To update a listbox with tag "mylistbox" with a cell of strings in mylistboxstr
set(handles.mylistbox, 'String', mylistboxstr);
To graph x,y data on an axes with tag "myaxes"
plot(handles.myaxes, x,y);
Use setappdata() and getappdata() to store and retrieve your data in different functions.
  1 件のコメント
David C
David C 2013 年 1 月 22 日
thank you! I will give the setappdata and getappdata functions a try! :)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by