LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I average data within a range of x when y is over a certain value?

Solved!
Go to solution

I'm a bit confused.

 

 

Will the peak finder also have this problem?

Message 21 of 29
(1,616 Views)
No.  My version will come back with an array of left edges and right edges.  The latest version I uploaded has an Index Array icon which will give you whichever peak you want.  I have it set to give me the first.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 22 of 29
(1,615 Views)

This fixes the problem.

 

 

Fixed.png

Tim
GHSP
Message 23 of 29
(1,612 Views)
So the green box will do the same thing as the orginal code then. It will keep all values that are in the true state. This would still be a problem if there were a second peak that got above the minimum value.
Tim
GHSP
0 Kudos
Message 24 of 29
(1,594 Views)

aeastet wrote:
So the green box will do the same thing as the orginal code then. It will keep all values that are in the true state. This would still be a problem if there were a second peak that got above the minimum value.

Yeah

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 25 of 29
(1,592 Views)

Thanks all for all the help

 

Tomorrow hopefully I can run some trials with the code as I have it set up now. I'd like to be able to set it up using the peak finder code, to prevent the issue of second, etc. peaks.

I'm having a problem, though, in outputting from Span and Left Edge to the inputs of the array subset, as it indicates that the data types are different. Any idea why this is happening or how to correct it?

0 Kudos
Message 26 of 29
(1,583 Views)

Tomorrow hopefully I can run some trials with the code as I have it set up now. I'd like to be able to set it up using the peak finder code, to prevent the issue of second, etc. peaks.

 His updated version in post 24 of this thread doesn't have that problem.

 


I'm having a problem, though, in outputting from Span and Left Edge to the inputs of the array subset, as it indicates that the data types are different. Any idea why this is happening or how to correct it?


Left Edge is an array.  Use Index Array to get the first element.  I uploaded a version that does everything including the average a few posts ago.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 27 of 29
(1,577 Views)
Thanks, I somehow missed that. Testing tomorrow!
0 Kudos
Message 28 of 29
(1,574 Views)

Thank you all so much for the assistance, honestly I want to mark more the one of having solved the problem but I don't think I can!

 

 

I ended up using both of the methods you set up. I used one to find the average of the first peak and one to find the average of every value above the threshold, and display both. No problems whatsoever and now I have two useful VIs to hang on to.

 

 

Thanks again,

 

Justin

0 Kudos
Message 29 of 29
(1,546 Views)