I have a M
xN
xD
volume and I need a l
xh
xw
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
l
xh
xw
. If this is the case and assuming your matrix is calledq
wheresize(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)
.