三次元の形状変換
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sz
am 29 Okt. 2021
Beantwortet: Atsushi Ueno
am 29 Okt. 2021
現在19×231250×19の3次元行列があります。
これを19×19×231250にして、
19×19の361個分を一つの列に並べて231250×361の二次元行列に変更したいのですが出来ません。
スクリプトが分かれば送っていただきたいです。
19×231250×19の行列は下記の乱数ので大丈夫です。
よろしくお願いいたします.
X=rand([19,231250,19])
0 Kommentare
Akzeptierte Antwort
Atsushi Ueno
am 29 Okt. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!