Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted

07-06-2020 01:50 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Labels:

Hello, I have a waveform graph that looks like below. Each bin is 5 ns and the total counts are the sum of y values for the whole x range. I wonder how to sum the y counts for an x range, such as 100-300 ns. My thought is to make a *for* loop to add the y value for every single x in the range of 100-300 (Not sure). If it is a curve, I may do the integral for x=100-300. Thank you

Solved! Go to Solution.

Highlighted
Options

Solution

Accepted by topic author beyonddd

07-06-2020 02:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi beyond,

@beyonddd wrote:

I wonder how to sum the y counts for an x range, such as 100-300 ns. My thought is to make a

forloop to add the y value for every single x in the range of 100-300 (Not sure).

The data should be provided in an array, so all you need is an ArraySubset function followed by SumArray…

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

Highlighted
Options

07-06-2020 03:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Got it. Thanks a lot, GerdW. I will extract the data as an array and try it.

Highlighted
Options

Solution

Accepted by topic author beyonddd

07-09-2020 12:19 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

If it's a graph, you're providing an array as an input. That's the data that's being represented by the graph.

Just take the subset of the array you're interested in.

Highlighted
Options

07-11-2020 10:33 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thank you, I have figured it out.