MATLAB: Reduce size of multidimensional array

concatenatemultidimensional array

Hello,
I have a multidimensional array size = 220 x 46 x 10 x 4 x2 . I would like to combine all of the data in the third dimension so that way I end up with a 4-dimesional array. Any help is greatly appreciated.
Take care and stay well!

Best Answer

One way using summing:
result = squeeze(sum(your_array,3));