I have this in octave:
octave:139> r
r =
3 1
7 2
octave:140> r(2,:)
ans =
7 2
octave:141> r(1,1)
ans = 3
octave:142> r(1,2)
ans = 1
This kind of indexing indicates to me that the dimension 1 is row and dimension 2 is column.
But down below when I specify dimension 1, I get max along the columns (now rows)
octave:143> max(r,[],1)
ans =
7 2
And here when I specify dimension 2, I get max along the rows (now colums)
octave:144> max(r,[],2)
ans =
3
7
Why so ?