Vectorize application of xcorr() function
显示 更早的评论
For the following code,
t = 0:1e-3:1-1e-3;
AF_hat = [];
fd_ = -8:0.1:8;
for fd = fd_
AF_hat = [AF_hat; xcorr(s,s.*exp(-1i*2*pi*fd*t))*Ts];
end
I would like to eliminate the for loop by doing something like,
xcorr(s,s.*exp(-1i*2*pi*fd_.'*t))*Ts,
but cannot get it to work.
Would welcome any comments/guidance.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Correlation and Convolution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!