三次元の形状変換
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
sz
el 29 de Oct. de 2021
Respondida: Atsushi Ueno
el 29 de Oct. de 2021
現在19×231250×19の3次元行列があります。
これを19×19×231250にして、
19×19の361個分を一つの列に並べて231250×361の二次元行列に変更したいのですが出来ません。
スクリプトが分かれば送っていただきたいです。
19×231250×19の行列は下記の乱数ので大丈夫です。
よろしくお願いいたします.
X=rand([19,231250,19])
0 comentarios
Respuesta aceptada
Atsushi Ueno
el 29 de Oct. de 2021
X = rand([19,231250,19]); % 現在19×231250×19の3次元行列があります
Y = permute(X,[1 3 2]); % これを19×19×231250にして
Z = reshape(Y,[361,231250]); % 19×19の361個分を一つの列に並べて
A = Z'; % 231250×361の二次元行列に変更
size(X)
size(Y)
size(Z)
size(A)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!