LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving average of 2d array.

Solved!
Go to solution

hello , I need someone to help me to find the average of the 2d-array in my code that attached with my quistion.

 

0 Kudos
Message 1 of 5
(2,669 Views)

Your code makes not a lot of sense.

 

In the first FOR loop you create a 2D array of sections, but since the sections depend on the data, they most likely have variable length. LabVIEW does not support ragged arrays directly. The second FOR loop just repeats the same thing as fast as the computer allows, and thus does not make a lot of sense either.

 

Can you explain in words how the array should be processed? I am sure this can be done with 10% of the current code.

0 Kudos
Message 2 of 5
(2,640 Views)

thank you for reply ..

actually the second for loop is wrong from me .. I need to calculate the average of the output array from the first for loop and then apply filter to remove some noise appears in the signal 

 

please help me if you can ..

0 Kudos
Message 3 of 5
(2,625 Views)
Solution
Accepted by Sanad995

If you want to average all sections starting with each local minimum, you could do something as attached. (very rough draft, probably needs a tweak here and there, so modify as needed)

 

Averaging already removes noise, so I am not sure what other filtering you have in mind.

0 Kudos
Message 4 of 5
(2,612 Views)

thank you so much for your help 

 

0 Kudos
Message 5 of 5
(2,607 Views)