I have 2 signals S1 and S2 that contain the same information, but S2 is shifted and scaled compared to S1 by an unknown amount (but small; eg shift would be of the order of 1-10 samples).
What is the best (=most effective yet simple) way to calculate (or estimate) the shift and scaling factor to apply to S2 in order to 'match' with S1.
I have read a few papers referring to using the phase information in FFT, but those were working on signals where scaling was not really an issue (and i must admit not to have understood them completely anyway). I am a bit lost on how to put this in practice when developing that in Matlab (actually I use Octave).
I would love to have an explanation using Matlab/Octave code if possible.
Thanks for any help.
Steve
PS: I add the tag 'image processing' because I suspect that such techniques would be used in automatic stitching of images (in panoramas for example)