I have a matrix W of 361*285.I want to create a matrix such that each column(1*285) of the matrix is reshaped into a matrix of (19*19)(read as atom)such that the atoms are concatenated into a 19*15 matrix
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
KL
2017-9-11
A = rand(361,285);
B = reshape(A,19,19,19,15);
3 个评论
KL
2017-9-12
编辑:KL
2017-9-12
You could index B depending on your needs. For example,
>> B(:,:,1,1)
would be 19x19 matrix (this is your atom I guess). There are 19x15 such atoms (from B(:,:,1,1) to B(:,:,19,15)).
Next, I don't understand what you mean by multiply 20x50 matrix to B? As I explained before, you should treat ND-matrix as a matrix of matrices.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!