I have a MxNxD volume and I need a lxhxw sliding window that goes through all the voxels of the volume. In each sliding window I need to compute the Root Mean Square Contrast. Which is the smarter way to do it?
I would like to limit the use of for loops because the volume is pretty big, 1024x1024x146.
It sounds like you want to divide into voxels that are
lxhxw. If this is the case and assuming your matrix is calledqwheresize(q) = [M, N, D].This makes a cell array with each voxel in a cell. Apply the function to each voxel using
cellfun(@foo, qPrime, 'uni', 0).