I have a 4-D array saved in a mat file like
ice_conc_monthly(:,:, year-1978, month) = d;
its is 304*448*37*12, how can i make it 3-D with 304*448*(37*12) size

 채택된 답변

James Tursa
James Tursa 2016년 12월 1일
편집: James Tursa 2016년 12월 1일

0 개 추천

E.g.,
x = your 304 * 448 * 37 * 12 array
y = reshape(x,304,448,37*12);
Another possibility if you want those last two dimensions arranged differently is to permute them first. E.g.,
x = your 304 * 448 * 37 * 12 array
z = permute(x,[1 2 4 3]);
y = reshape(z,304,448,37*12);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2016년 12월 1일

편집:

2016년 12월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by