我在matlab中有一个像这样的4D数组,
test(:,:,1,1) =
0
test(:,:,2,1) =
0
test(:,:,3,1) =
0
test(:,:,4,1) =
0
test(:,:,5,1) =
0
test(:,:,1,2) =
0
test(:,:,2,2) =
0
test(:,:,3,2) =
0
test(:,:,4,2) =
0
test(:,:,5,2) =
0
test(:,:,1,3) =
0
test(:,:,2,3) =
0
test(:,:,3,3) =
0
test(:,:,4,3) =
0
test(:,:,5,3) =
0
test(:,:,1,4) =
0
test(:,:,2,4) =
0
test(:,:,3,4) =
0
test(:,:,4,4) =
0
test(:,:,5,4) =
0
test(:,:,1,5) =
0
test(:,:,2,5) =
0
test(:,:,3,5) =
0
test(:,:,4,5) =
0
test(:,:,5,5) =
0
K>> test
test(:,:,1,1) =
0
test(:,:,2,1) =
0
test(:,:,3,1) =
0
test(:,:,4,1) =
0
test(:,:,5,1) =
0
test(:,:,1,2) =
0
test(:,:,2,2) =
0
test(:,:,3,2) =
0
test(:,:,4,2) =
0
test(:,:,5,2) =
0
test(:,:,1,3) =
0
test(:,:,2,3) =
0
test(:,:,3,3) =
0
test(:,:,4,3) =
0
test(:,:,5,3) =
0
test(:,:,1,4) =
0
test(:,:,2,4) =
0
test(:,:,3,4) =
0
test(:,:,4,4) =
0
test(:,:,5,4) =
0
test(:,:,1,5) =
0
test(:,:,2,5) =
0
test(:,:,3,5) =
0
test(:,:,4,5) =
0
test(:,:,5,5) =
0
现在我想得到一个像这样的数组
ans =
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
是否有一种简单的方法来转换维度。 我对Matlab中的多维数组非常陌生。 如果有人知道任何解决方案,请告诉我。