MATLAB: Do “size” and “max” dimension conventions contradict

contradictiondiminconsistent conventionMATLABmaxoppositesize;

I've found a "DIM" convention within matlab that is contradictory and very tricky to find if you're not looking for it. Seriously, this seems like one of those convention mistakes that causes space probes to crash into things.
If you type in
help size
You'll get some text that says "M = size(X,DIM) returns the length of the dimension specified by the scalar DIM. For example, size(X,1) returns the number of rows. If DIM > NDIMS(X), M will be 1."
Ok, so a DIM of 1 means rows, 2 means columns then, got it.
Then if you look at
help max
You get this
[Y,I] = max(X,[],DIM) operates along the dimension DIM.
Example: If X = [2 8 4 then max(X,[],1) is [7 8 9],
7 3 9]
max(X,[],2) is [8
9]
Whoa! Hold on, now the DIM value of 1 means columns all of a sudden?! What the hell is this?! This seems literally irresponsible of MathWorks to do this. I expect programming syntax to be consistent.
Maybe I'm finally "joining the club" of people who realize this. And I'm guessing there's nothing anyone can do about it since, if they switch now, all previous scripts where the people realized this contradiction would produce errors after the correction.
So that in mind I guess my main point is make this somehow obvious, like by explicitly stating this deviation in the text of the help commands. If I'm reading the help quickly and see, "Oh, ok, it's variable name, then square brackets, then DIM." I'm also not going to think "huh, I should investigate this passive example to see if DIM has the same convention or not." In this situation, I just happened to stumble on it by mistake.
Are there also times when a "+" actually subtracts? Please let me know if there are!

Best Answer

I don't see an inconsistency either, and I never did. Basically 1 means the first index which means "rows". So whether you do size(m, 1) to count going down the rows, or max(m, [], 1) to find the max going down the rows, either way you're processing by going down the rows of the matrix. I see no problem with it, and I'm not aware of being in any club about it.