# MATLAB: I want to get the max value from a column matrix from a specific no of rows

script code program

suppose i have a 269712×1 column matrix ,from the matrix i want to find the max value from each 8760 rows and in this way i have to get 1 value from each 8670 rows which are repeated 30 times. How do i proceed?

 m=zeros(30,1);  for i=1:30      m(i)=max(max(A((i-1)*8760 +1 : i*8760)));  end
m=zeros(30,1);A=A';for i=1:30    m(i)=max(A((i-1)*8760 +1 : i*8760));end