Multiply and shift ?
1 次查看(过去 30 天)
显示 更早的评论
I would like to have a code that can generate the maltiplication for x after shifting them many time
x=[1 2 4 1 3 4 5 1 3]
I would like to have a loop that can generate the autocorrlation for x with itself.
to illustrate;
x*x
R(1)=sum([1 2 4 1 3 4 5 1 3]*[1 2 4 1 3 4 5 1 3])/Length(x)
R(2)=sum([ 2 4 1 3 4 5 1 3]*[1 2 4 1 3 4 5 1 ])/Length(x-1)
and so forth until the R(N) computed
0 个评论
回答(1 个)
Catalytic
2019-3-29
编辑:Catalytic
2019-3-29
R = ifftshift(xcorr(x,'unbiased'))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!