From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help averaging three waveforms without zeros

Solved!
Go to solution

Greetings,

 

  As part of a project I'm doing. I'm given a VI (attached) that has three waveforms. I need to average the three waveforms (generated with the ‘Introduce Zeros’ option ON - see the front panel) taking care not to include the zero values into the average. I then need to plot the resulting average with the original three waveforms.

 

   Now, I think I would need to do this with Interpolate 1D, but I'm not sure which method to use (spline, nearest, etc.) and, according to this VI attached, what gets wired to what. Now I did put 1D interpolate in there already, but when I do hit the Introduce Zeros Option, one of the waveforms disappears, so that's not right.

 

  Any help would be appreciated.

 

  Thanks!
  TheLT

0 Kudos
Message 1 of 5
(2,248 Views)

Hi LT,

 

here's an idea:

check.png

Now you only have to include one more test in case all three waveforms show a zero for the same index...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,235 Views)

GerdW,

 

   Thanks for posting back.

 

   OK, wait a minute, I was told that I don't need spline yet, just need to average the waveformsand being careful not to include the zero values in the average - and plot the resulting average with the original waveforms.

 

  I did try to implement your idea, but I don't think it does that. Can we please continue to discuss?

 

   Thanks!
   TheLT

0 Kudos
Message 3 of 5
(2,225 Views)
Solution
Accepted by topic author TheLT

Hi LT,

 


just need to average the waveformsand being careful not to include the zero values in the average - and plot the resulting average with the original waveforms.


 

What do you want to discuss? My example does exactly (I hope) what you want! Atleast when I checked it with your data...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,213 Views)

GerdW,

 

   I know wehre I went wrong. We're good. Thanks for your help.

 

  TheLT


0 Kudos
Message 5 of 5
(2,200 Views)