Hi Vinod Kumar Govindu
having faced similar problem, I found out the following points may be of interest to you
1. that the standard MATLAB function conv has a limitation: it resets the time reference, not really knowing when the convolution starts and stops, let me explain:
as you can see, the resulting convolution always starts n=1 regardless of when do x and y really start. The correlation should tell when both signals start having something in common.
To improve this, the literature reference
Digital Signal Processing Using MATLAB
by Vinay K Ingle, John G Proakis
in page 44 a convolution function is developed taking into account the start and stop indices of x and y:
function [y,ny] = conv_m(x,nx,h,nh)
nyb = nx(1)+nh(1); nye = nx(length(x)) + nh(length(h));
ny = [nyb:nye];
y = conv(x,h);
The same literature reference suggests another alternative convolution, with the Toeplitz calculation of the equivalent matrix that one just has to multiply to x to obtain y, instead of running all the progressive sums shifting y one reference vector value at a time:
Nx = length(x); Nh = length(h);
hc=[h; zeros(Nx-1, 1)];
further reading regarding the toeplitz function
Perhaps you would like to consider using function corrcoef that shifts x and places in each line of the output matrix RHO the result of each sum of your expression CCF, corrcoef also outputs how sell correlated are x and y for each value of k, in the shape of another matrix
the closer a value of pval is to 1, the more alike are x(n) and y(n-k). p(i,j)=1 means identical.
Since you want to convolve 2 complex signals, perhaps you would like to decompose the operation the following way:
or you would consider working with modulus and phase, and then just check how correlated are modules and phases:
if you find this answer useful would you please be so kind to mark my answer as Accepted Answer?
To any other reader, please if you find this answer of any help solving your question,
please click on the thumbs-up vote link,
thanks in advance