Unfold 3D I x J x K to 2D I x JK
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to unfold a matrix in the form I x J x K to I x JK corresponding to I batches, J variables and K time periods (within the batch).
I currently have got this matrix:
And I need it in the form:
How would I go about doing this as I think reshape is inadequate?
Thanks
采纳的回答
KALYAN ACHARJYA
2019-8-1
编辑:KALYAN ACHARJYA
2019-8-1
"I am trying to unfold a matrix in the form I x J x K to I x JK"
May be: Are you looking for this one?
[R C D]=size(M);
X=reshape(M,R,C*D)
I ignored this part "corresponding to I batches, J variables and K time periods (within the batch). "
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!