I have a 10000×10000 matrix of data that I'm trying to scale down. You goal is to make it a 400×400 matrix by taking every cell in 25×25 cell chunk and averaging them into one value. I'm trying to use the reshape function to do this, but I dont know how to scale down the matrix by any factor other than 2, the code for that is below. Any advice on hw I can do to adapt or rewrite this is appreciated.
[x,y] = size(matrix);x1 = x/2;y1 = y/2;R = reshape(reSizedData,2 , x1, 2, y1);S = sum(sum(R, 1), 3) * 0.5;Y = reshape(S, x1, y1);
Best Answer