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