LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sum up waveforms

Hi everyone - I think I'm going nuts.

I've been trying for 5 hours, to sum up some waveforms.

What I have is the following:
* 19 waveform arrays consisting of 3 waveforms each.

What I want
3 waveforms whereas each contains 19 values which were added and then divided by 19 (I think it's called an average).


I tried using Shift - Registers, the Auto Indexing Feature, but my mind simply starts to break when it comes to more than 2 dimensions.


Is there an EASY way to do this?

My thoughts were as follows:
* Transpose the array, so you will have 3 arrays with each containing 19 waveforms
* For every one of the 3 arrays:
 ** take the y values and sum them up (using a shift register)
 

But this always yields an empty array, which makes me go crazy ...

I attached an example of what I was doing.


0 Kudos
Message 1 of 4
(5,142 Views)
I can't give you an easy solution, but I see why your VI doesn't work. You'll have to initialize the sum array with correct dimensions before connecting it to the for loops. What you do now is adding an array to an array of size 0. This will return an array of size 0 which is then wired to the shift register.
0 Kudos
Message 2 of 4
(5,137 Views)

Thomas

I have attached an example in LV8 that generates 19 noisy waveforms, adds them, then divide by 19 all using waveform arithmetic

I am sure this is not the most elegant way but its one way of doing it.

Does this help you?

David

Message Edited by David Crawford on 09-12-2006 06:05 PM

Download All
Message 3 of 4
(5,119 Views)
I can't believe it. That small thing works?!? (actually it does)

Thank you for your help - I think you saved me a few hours 🙂

0 Kudos
Message 4 of 4
(5,091 Views)