Seems to work well. Seems faster than normxcorr2_mex for larger arrays, which is no longer on Matlab Central but is around on the internet.
24 Jul 2011
Command-line peak fitter for time-series signals. Version 5.7, September, 2014
Author: Tom O'Haver
This seems to use a parameter no longer supported in Matlab R2010B.. I get this erorr message:
??? Error using ==> optimset at 204
Unrecognized parameter name 'TypicalX'. Please see the optimset reference page in the documentation for a list of acceptable option parameters. Link to
I am running 2014a on a machine with 192Gb of RAM and 20 cores. I am trying to convolute two vectors, one with 3,060,663 elements, the other with 693. The built-in conv took 0.06 seconds. convnfft filled the memory and then crashed the machine.
This function is indeed faster than CONV, but as soon as I attempted to use it on larger data sets, Matlab produced an 'out of memory' error, whereas CONV can cope just fine with the same datasets (albeit taking longer).
FYI if I run the 'memory' command my output is as follows:
Maximum possible array: 11862 MB (1.244e+10 bytes) *
Memory available for all arrays: 11862 MB (1.244e+10 bytes) *
Memory used by MATLAB: 820 MB (8.597e+08 bytes)
Physical Memory (RAM): 8011 MB (8.400e+09 bytes)
So the problem definitely isn't my hardware
Excellent job! Nicely documented and elegant code and to the point!
Works much faster than conv2 for full case, and also faster than conv2 with option 'valid', which misteriously makes conv2 35x faster with a 500x500 matrix with a 400x400 one (makes me suspect that conv2 + 'valid' does not just extract the mid part but saves computations).