MATLAB: Finding the max of the first x rows in a column vector

column vector max

i have a column vector with 100 rows. how can i find the maximum value of the first 50 rows?

Best Answer

max(a(1:50))