Hi all, I have a big 3-D matix that I want to squueze into a 2-D one while picking up the values that are bigger in absolute magnitute in the third dimension: [c,in]=max(abs(s),,3); x = s(:,:,in); s is the 3D matrix of size 5 X 20480 X 2. So I want to squeeze it along the 3rd dimension by comparing the values. I get the "out of memory" error. I don't want to use loops. How can I address this problem?