How can I store a matrix in a row of another matrix? MATLAB -
i have 3d matrix , want store each 2d component of in row of 2d matrix has many rows 3rd dimension of 3d matrix.
how can this?
reshape(permute(a,[3 2 1]),size(a,3),[])
sample run -
>> a(:,:,1) = 7 1 7 5 3 4 8 5 9 4 2 6 a(:,:,2) = 7 7 2 4 7 6 5 6 3 2 9 3 a(:,:,3) = 7 7 5 3 3 9 2 8 5 9 2 3 >> reshape(permute(a,[3 2 1]),size(a,3),[]) ans = 7 1 7 5 3 4 8 5 9 4 2 6 7 7 2 4 7 6 5 6 3 2 9 3 7 7 5 3 3 9 2 8 5 9 2 3
Comments
Post a Comment