How to change dimenssion of a n-d array without using reshape function in matlab?
I have an array of kxnxmxt. When i retrieve one element it is like A(i,:,:,:) and the result is 1xnxmxt array. I want it to be only nxmxt and i dont want to use reshape for efficiency reasons.
Than开发者_如何学Pythonks
Try this
squeeze(A(i,:,:,:))
It removes the additional dimension
精彩评论