LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding remaining samples of an array to the next one

Hello
 
I have a series of arrays (512 samples each) from which some of them are sub-divided into more sub-arrays (of length 63 each or 68 etc) depending on some factor. Most of the times the number i want the array to be divided to, does not evenly divided to 512, i.e, there are some samples remaining at the end (512/63=8 sub arrays +8 remaining samples), which are zero-padded to create another sub-array.
What i would like to do, instead of zero-padding those remaining samples, to transfer them at the beginning of the next array (512+8) and then that array of 520 now, to be divided into whatever number of sub-arrays i need to and this to be repeated whenever remaining samples exist. Is this possible? Could somebody help me here please?
 
 
0 Kudos
Message 1 of 4
(2,301 Views)

You could just append all arrays first (built array, concatenate mode), then get your series of subsets (or reshape as e.g. N x 68, where each row will be one subset).

There are many possible other solutions depending on how the data is arranged. Please attach a simple example containing simulated data. Is all data known from the beginning or does new data arrive in a loop?

0 Kudos
Message 2 of 4
(2,298 Views)
Hello Altenbach
 
If i just attach my code and point you exactly where the arrays come and where i get the length for the subsets from, would that be ok?New data arrive at each iteration in the loop and i dont know how to put everything together
0 Kudos
Message 3 of 4
(2,293 Views)
 
Download All
0 Kudos
Message 4 of 4
(2,284 Views)