Creating an app which plots from imported .csv
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I was trying to make an app in which the user can import a .csv file containing a list of data as shown in the image.
I'm having trouble making dropdowns from which the user can choose the desired columns which would then be shown below before plotting as a scatter.
Is there a simple way to do this?
Thanks in advance!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/501998/image.png)
0 Kommentare
Antworten (1)
Mario Malic
am 28 Jan. 2021
Hello,
You can create a CellSelectionFcn callback for your UITable component. If you click on the column while holding the control button, you'll get selection indices as an array. Note on the control button, you can notice how selection is different if you use shift vs control so take this into account.
indices = event.Indices
indices = % ctrl click
1 2
2 2
3 2
4 2
indices = % shift click
1 1
1 2
2 1
2 2
You can use second column in indices to get the columns you want to plot, but you'll need the column names to index into the table.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!