06-07-2024 05:18 AM
Hello, I want to give the user the choice to select the signals they want to plot among 6 acquired signals; I have created a listbox of the names of these signals but I don't know how to associate each name with a signal.
The user can choose multiple signals from the 6, and I would like to plot them on the same graph.
Can you help me?"
06-07-2024 09:05 AM
Hi Amelie,
@ameletudiante99 wrote:
Hello, I want to give the user the choice to select the signals they want to plot among 6 acquired signals; I have created a listbox of the names of these signals but I don't know how to associate each name with a signal.
The user can choose multiple signals from the 6, and I would like to plot them on the same graph.
The listbox gives you an array with the indices of the selected items (in multi-selection mode). You can use those indices to index your plots for the graph…
Maybe it's a good idea to attach your approach on this problem?
06-07-2024 09:20 AM
Yes, that's what I want to do; but how can I index a graph? I want to make each index correspond to a graph? but I don't know how it's possible given that the index list of my listbox can contain several elements, I thought of a structure box but I can't come up with this case
thank you for your reply
06-07-2024 09:23 AM
If your signal is in a 2D array of numbers, where each signal is a row of the 2D array, you can use the list box as the index of the 2D array. using the function Index Array to select the row of your signal and plot on a graph.
06-07-2024 09:29 AM
If you are using a multiple listbox, the outpub is an array of indexes, then you need to add a for loop to select only the only the selected channels and plot all together