07-30-2024 11:49 AM
So you want to leave out the white data at the bottom? What should happen if some data is only selected partially?
No I want to include the data of all the traces
Do all the traces really have different x-values that are randomly spaced?
I don't think the data is random.
It's coming from an array with 9 traces, where the data is stored ,in each iteration, from top to bottom.
I believe that in each iteration, the graph is replotted using the data from this array.
So in a way, it mimics a chart.
How do you want the output of the selection arranged?
I want to have an array of all the selected data in an Excel file, with each trace in a separate column and a column for the date and time of each measurement.
07-30-2024 04:55 PM
So, again, then you don't need the cursor y position at all.
Your full data is a 2D array and all you need to do is taking a 2D array subset based on the two cursors.
Writing a 2D array to file is trivial.
08-05-2024 06:49 AM
I tried to create a subarray, but it doesn't seem to work.
08-06-2024 11:43 AM
You need to translate your x values into array indices, of course!
08-06-2024 11:45 AM
Yes that's what was not working.
So I copied the code you used for the integral and tied the cursors to a random plot.
And it worked!