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?

enter image description here

with permute & reshape -

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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -