Filter löschen
Filter löschen

Taking one dimension of a matrix

26 Ansichten (letzte 30 Tage)
Anwesh Saha
Anwesh Saha am 2 Feb. 2023
Beantwortet: Dyuman Joshi am 2 Feb. 2023
I have a 972X48X128 matrix double, and I want to save the first 2D matrix of the 3D matrix in another variable of dimension 1X48X128.
How do I accomplish this?

Akzeptierte Antwort

Dyuman Joshi
Dyuman Joshi am 2 Feb. 2023
in = rand(972,48,128);
out = in(1,:,:);
size(out)
ans = 1×3
1 48 128

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by