3 ms·
Yes probably reshape would be the natural MATLAB way to do it. Under the hood it doesn't change the memory allocation of the mxArray, just the metadata -- so th
by Serow225 8y ago
Yes probably reshape would be the natural MATLAB way to do it. Under the hood it doesn't change the memory allocation of the mxArray, just the metadata -- so the reshape takes virtually no time. But if you wanted to do the loop like that, I think you could simplify that to 1:10:end , btw.
Also there is a blockproc function that will do it for you, you just pass in the chunk size and a function handle to 's', but it's in the Image Processing toolbox