ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

average array

I am doing FFT for the signal. I would like to average the FFT results of several times, which means adding and dividing them. Now I have got n*5000 points for n times. But how can I add them after I split the original array into serveral 5000 point parts? Thanks!
 
0 Kudos
Message 1 of 14
(6,187 Views)
Hi Qimars,

attached you find an example to get the mean of columns...

Note:
clean up your source! You don't need to insert data into an empty array (lower right corner of main loop)...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(6,181 Views)
Sorry, I only have Windows2000 system and Labview8.20. I cannot open it. Can you just show me a picture?
0 Kudos
Message 3 of 14
(6,168 Views)
Hi Qimar,

sorry, here comes the LV8.2 version.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 14
(6,164 Views)
Hello Qimars,
 
try something like this. I hope it helps you.
 
Mike
0 Kudos
Message 5 of 14
(6,162 Views)
Hi Mike,

here's a simplified version of your example Smiley Wink

Btw. I think Qimar want to average lines of data...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(6,153 Views)

Hi Mike and Gerd

You two are so warm-hearted. Thanks a lot!

But what I want to get is also an array, not a number.

2*3 array

1 2

3 4

5 6

what I want is 1*3 array

1.5

3.5

5.5

The first one "MeanOfColumn_LV82" seems right. Because it is (Column+Column....)/N = Column. But it doesn't work if I input some data. So can you give me some further help? My output needs to be one Column which is of tpye array.

0 Kudos
Message 7 of 14
(6,147 Views)

Hello again,

ok, here a version with Array output. The other example from GerdW didn´t run because of the empty Array i think.

 

Mike

0 Kudos
Message 8 of 14
(6,142 Views)
Hi Qimar,

well, I shouldnt' have used that empty array constant...

Attached version shows calculation for rows and columns...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 14
(6,134 Views)
Mike,Gerd, I got your idea. But how can I change the input array size?
 
0 Kudos
Message 10 of 14
(6,130 Views)