Why does MATLAB 6.5 (R13) report the wrong SIZE and LENGTH result on a matrix returned by RESHAPE?
This problem only occurs when the code is inside a script or function. The following code will reproduce the problem:
a=[1 1 1 1 1 1 1 1 1 1 1 1]size(a)length(a)b=reshape(a,[2,2,3])size(b)length(b)
Notice how the last dimension is left off the size of "b", and the length does not recognize the 3rd dimension, either.
Best Answer