MATLAB treats ALL matrices as having essentially an infinite number of trailing singleton dimensions. So a 2x3 matrix is really 2x3x1x1x1x1x1x1... Those trailing singleton dimensions are not reported by size or whos however.
X = zeros(2,3,1,1);
whos X
Name Size Bytes Class Attributes
X 2x3 48 double
size(X)
ans =
2 3
However, MATLAB indeed knows that X has trailing singleton dimensions. You can convince yourself of that easily enough.
size(X,3)
ans =
1
size(X,12)
ans =
1
Your 2037x10 matrix is indeed a 2037x10x1 matrix. So a simple reshape was all you needed to do.
B = reshape(A,[2037,10]);
Best Answer