matlab - How to read the matrix values after "reshape" -
say instance have following vector
:
x=[1 2 3 4];
here, vector read follows:
x1=1 x2=2 x3=3 x4=4
is correct?
now, if following:
y = reshape(x,2,2);
i following matrix
:
1 3 2 4
in case, values of y1, y2, y3, , y4
? in vector
above?
thanks.
matlab stores data in column-major order.
for lots more details , examples of matlab indexing, see matrix indexing in matlab.
Comments
Post a Comment