LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vectors

Hello Everyone!!

 

I have a problem.... I have a vector with data, and I have to get the numbers by tens, and with that ten numbers do the average and save that number, because when the vector finishes, I will have to do a vector with all the averages of all the vector...I don't know if I have explained myself correctly.....

 

Thanks for the help!!!

 

G.R

0 Kudos
Message 1 of 6
(4,031 Views)
ps: I have Labview version 8.0
0 Kudos
Message 2 of 6
(4,029 Views)

You can use a simple for-loop to peel off every tenth element of your 1D array (I'm assuming you're referring to a 1D array when you say vector). Or, you could use the Decimate 1D Array function, but you'd need to expand it to have 10 terminals.

 

I'm not sure I understand what you mean by "when the vector finishes". Is this an array that is being populated "along the way", and you're trying to calculate a running average?

0 Kudos
Message 3 of 6
(4,021 Views)
sorry if I have not explained myself... I have to get for example, the 10 first numbers of the vector and do an average, then the second's ten numbers, and do the average, and so on... once I have all the averages, put them all in one vector!!
0 Kudos
Message 4 of 6
(4,017 Views)
Same difference. You're still going to use a for-loop, and you'd use the Quotient & Remainder function to tell you how many times to run the loop. Inside the loop you'd just use Array Subset to extract the 10 elements and get the average. Autoindexing will generate your output loop.
Message 5 of 6
(4,002 Views)

Thanks a lot... I'll try and see what's up...

 

Thanks!

0 Kudos
Message 6 of 6
(3,997 Views)