04-09-2022 01:47 AM
In waveform, I want to know the area between the cursor and the signal which is showing between the cursor.
04-09-2022 10:11 AM
If you know the index locations of those cursors, I would create another waveform with data only at locations between the cursors and the rest of the data changed to NaN (this tells the graph not to plot).
Now this second waveform you created can be configured to use a filled plot.
Next, about the area under the curve, I believe you can use the math library to extract the area.
04-09-2022 10:26 AM
Your question is too ambiguous to give a precise answer, because a picture alone is not sufficient.
Assuming it is a simple waveform graph and 1D DBL array, use the cursor index property (make sure the cursors are locked to the plot!) and integrate the subset between. To graph the data, duplicate the data and make a 2D array, but replace all data outside the cursors with NaN and set the plot style to "fill baseline to zero".
04-09-2022 10:51 AM - edited 04-09-2022 11:02 AM
@altenbach wrote:
Assuming it is a simple waveform graph and 1D DBL array, use the cursor index property (make sure the cursors are locked to the plot!) and integrate the subset between. To graph the data, duplicate the data and make a 2D array, but replace all data outside the cursors with NaN and set the plot style to "fill baseline to zero".
Here's how that could look like:
You also need to decide to include or exclude the cursor positions for the area calculations, so modify as needed (i.e. define "between" exactly). Of course things only need to be recalculated when the data or cursor positions change, so use an event structure. You can use a cursor move or cursor release event to get the "CursIdx" of the moved cursor from an event data node. (Not shown)