Reshape 4D matrix, keeping the 1st and 2nd dimensions intact

Hi
I have a 4D matrixs, the first tow dimentions represent the coordinats, (144,73,17,1460)
What I'm asking for is spletting this matrix to cover the valeus in the 3rd and 4th dimentions, I mean (:,:,i,j) where i = 1:17 and j = 1:1460
and the out put should be Aij following the valeus of i&j respectively (A11,A12..., A12,...A171460)
Thanks in advance

 Accepted Answer

B = reshape(A, 144, 73, []);
The result is a [144 x 73 x 17*1460] array.

More Answers (0)

Categories

Products

Release

R2017b

Asked:

on 22 Feb 2019

Edited:

Jan
on 22 Feb 2019

Community Treasure Hunt

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

Start Hunting!