Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个维度的 3 维矩阵:427x470x48
我想将其重塑为二维矩阵:48x200690
这意味着 old(1, 1, :) 将对应于 new(:, 1)
此外, old(1,2,:) 将对应于 new(:,2) 等等。
谢谢你
做:
new = reshape(permute(old, [3 2 1]), 48, []);
您还可以通过以下方式粗略检查它们是否相等:
numel(intersect(old(1,1,:),new(:,1))) == 48;