LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding breath rate and duration

Hello all,

I combined and rectified two sine signals with different amplitude to simulate inhale and exhale sound envelope.

 

I'm trying to find the rising and falling points (highlighted in red) of the signal to count the peaks, and then find the indices of rising and falling and put them in an array to distinguish between inhale and exhale and find their duration.

 

I tried the following code in MathScript but it's not working, can you please help me correct it?

 

P.S. I'm using MathScript because the normal VI blocks weren't accurate in determining the count and duration

 

thank you, 

Mathscript pic.PNG

Simulation SIG.PNG

  

0 Kudos
Message 1 of 1
(2,947 Views)