Convert 3D matrix to 2D matrix.

4 Ansichten (letzte 30 Tage)
Aniya
Aniya am 19 Okt. 2016
Kommentiert: Aniya am 19 Okt. 2016
If i have value of x,y,z plane in 3D matrix and i want to change the 3D to 2D array( of each x plain).

Akzeptierte Antwort

Massimo Zanetti
Massimo Zanetti am 19 Okt. 2016
I try to guess from your question:
%random 3D array
A=rand(5,6,7);
%extract a 2D matrix from first dimension of A
x=1; % x can be from 1 to 5 in this example
B=A(x,:,:)

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by