Plotting Selected Items from a List
Ältere Kommentare anzeigen
I have been trying to figure out how I can plot one or more items that the user chooses from a list. I have 22 items in total that each have their own specific plots. Is there any way I can do this? So far, I have used listdlg() and if-else statements, but that only works if I only want to plot one item.
6 Kommentare
Geoff Hayes
am 5 Jun. 2019
autumn - please post some of your code so that we can get an idea of what you have attempted. How do you plot the list items? Do you allow for multi-selection of list items?
autumn
am 5 Jun. 2019
Geoff Hayes
am 5 Jun. 2019
How are you getting the coordinates from the items that have been selected? Presumably objects is an array of indices. Also, please clarify what you mean by when I try to allow for selection of more than one object, it no longer works. What happens? Is there an error or something else?
autumn
am 5 Jun. 2019
Star Strider
am 5 Jun. 2019
Consider using the any function:
any(objects == 1)
Geoff Hayes
am 5 Jun. 2019
Since objects is a 1x2, does that mean you have selected the first and eigth item in the list box? How are you then extracting the coordinates from the structure? Please show the code to do this.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!