Hey, Here is the matlab code, I took the matrix of 15 *1 and tried to find the max values for 1st 6 elements. Just change those parameters in the code:
clc
clear all;
a = [ 1; 5; 6; 3; 6; 9; 8; 4; 5; 8; 0; 0; 0; 0; 1]; % Your vector=941x1
x = length (a);
n = 6; % Need to find the max from 1st numbers, In your case 62
iter = ceil(x/n);
for i=1:iter
max(i) = 0;
if (i==1)
for j = 1: n*i
if (a(j)>max(i))
max(i) = a(j);
end
end
else
for j=n*(i-1)+1:min(n*i,x)
if (a(j)>max(i))
max(i) = a(j);
end
end
end
end
Enjoy.
-sv