LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need to seperate data aray into samples of 100 at a time to run through kurtosis and plot

Hello,

 

I am trying to build a vi that will take in a file and build an array (this part done) from it. from the array, I need to take samples of 100 and run kurtosis on and build an array of results for entire data set and possibly plot kurtosis values. any ideas? I have attached what i have so far. I keep getting errors for the kurtosis VI, not sure what the problem is.

 

Thanks,

0 Kudos
Message 1 of 3
(2,451 Views)

Your program does not make a lot of sense. Why use a while loop that chops through your data in nanoseconds (=way before you have a chance to press the stop button!) and runs out of data equally quickly, leaving you nothing at the output tunnel. Why is your kurtosis indicator EXT datatype???

 

The number of segments is exactly known, so the loop must stop after a known number of iterations. Since the number of iterations is size/100 (possibly rounded up), you need a FOR loop, or even easier, reshape the 1D array to a 2D array where each row is size 100 (see attached).

 

Now simply loop through your segments and built an array of results at the output tunnel.

 

Here's a quick draft example (LV 9.0), modify as needed. Since you did not include the subVIs, I skipped them and faked some data instead. I added some extra graphs for troubleshooting. Delete them once you are happy with the code.

 

 

Message 2 of 3
(2,442 Views)

Thanks for the reply and the VI. Sorry I didnt include the subs. I am not a very seasoned programmer and its been a while since I have programmed with LV. I initially tried the for loop but couldnt get it working right, I can learn a lot by the way this VI is structured. Thans again,

0 Kudos
Message 3 of 3
(2,426 Views)