Filter löschen
Filter löschen

How do I change the array of 200x2x100 to 100x2x200?

2 Ansichten (letzte 30 Tage)
JIWON LEE
JIWON LEE am 28 Apr. 2021
Bearbeitet: Subhadeep Koley am 28 Apr. 2021
In Python, I use "np.transpose" code, but I don't know how to use it on Matlab..

Akzeptierte Antwort

Subhadeep Koley
Subhadeep Koley am 28 Apr. 2021
Bearbeitet: Subhadeep Koley am 28 Apr. 2021
% Generate demo data
data = rand(200, 2, 100);
% Permute the data
newData = permute(data, [3 2 1]);
size(data)
ans = 1×3
200 2 100
size(newData)
ans = 1×3
100 2 200

Weitere Antworten (0)

Kategorien

Mehr zu Call Python from MATLAB 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!

Translated by