I am very sorry if similar question was asked before. I have two vectors of 50 x n, and want to find the shift of the first vector, which provides the closest match with the second vector. I have tried fminsearch
and circshift
in Matlab, however, could not exactly find how to use them in this case.
I also saw the discussion here, however, I do not need a representative function or interpolation to match the two vectors. Instead, I just want the best shift of one profile, which minimizes the differences along the profile. I will be happy if you can direct me. Also, could I use fminsearch
to solve this problem?