How do i turn my 4D matrix into a 3D matrix

조회 수: 23 (최근 30일)
Umi Pollmann
Umi Pollmann 2021년 6월 6일
답변: SALAH ALRABEEI 2021년 6월 6일
I have a 4D matrix which has the dimensions latitude = 360, longitude = 720, time = 27, N = 5. How can I delete the dimension called N and turn the matrix into a 3D matrix?

답변 (1개)

SALAH ALRABEEI
SALAH ALRABEEI 2021년 6월 6일
I think you cannot convert 4D matrix into 3D if non of the dimensions is equal one.
If A is of size (100×50×1×20) lon, lat, depth and time. Then you can use this
to remove the fourth dimension
%
squeeze(A)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by