LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate the summation of each M elements of N dimention array ?

Hi guys,

I need some help for the fastest way to get the summation of each K elements of N dimention array (for example, the sum of each 10 element of 683 array)

The following program is where I want to use this summation (the array 'd' has a size of 683)

for i=k+1:683-k

    sumd=0;

    for j=1:k

        sumd=sumd-1/d(i-k)+1/d(i+k);

    end

    AD(i)=d(i)*(sumd+1/d(i));

   

end

Thank you

0 Kudos
Message 1 of 1
(2,710 Views)