MATLAB Answers

Delete a dimension from a 3d array to convert into a 2d array (Matrix)

1 view (last 30 days)
Akaash Dragon
Akaash Dragon on 5 Dec 2019
Answered: Guillaume on 5 Dec 2019
I have an array of the following dimensions 1x3500x250. I want to delete this one extra dimension and convert it into 3500x250 2d array matrix in Matlab. How do I do it?

  0 Comments

Sign in to comment.

Accepted Answer

Guillaume
Guillaume on 5 Dec 2019
squeeze(yourarray)
or
permute(yourarray, [2 3 1])
squeeze is simpler and will get rid of all singleton dimensions.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products


Release

R2018a