My command window for one of the columns is underneath code and i just cannot figure out how to get the max value in each column. i have gotten down to having columnval= each number in each column but when cant figure out how to go about getting the max because what ive tried ends up giving me same maxval for every columnval.
A=randi(100,6,5) for columns=1:5 column=A(:,columns) maxvalue=0; for columndown=1:6 columnval=column(columndown,:) if columnval>maxvalue maxvalue=columnval; end endend
column =
6
18
67
34
90
12
columnval =
6
columnval =
18
columnval =
67
columnval =
34
columnval =
90
columnval =
12
Best Answer