This question is closed and may reopen in the future if edited.
No products are associated with this question.
m=[1,2,3; 4 4 4; 3 3 1]; n = size(m,2);
returns n = 3
I suspect that you have a different function called size() that precedes the MathWorks' version on your path. Or maybe you have a variable called size() in your program or command window. Both of these possibilities are very bad ideas
If you enter:
what do you get. If it says "is a variable", then remove that variable. If you get a path other than something like
Then remove the other function, or move it to a folder not on the MATLAB path.