dissipation in frequency fft
1 次查看(过去 30 天)
显示 更早的评论
x=rand(1,8); for q=0:7 for r=0:7 if mod(r,2)==0 l(2r+1)=(x(r+1)+x(r+5))*exp(-1i*q*r*pi/2); else l(2r)=((x(r+1)-x(r+5))*exp(-1i*r*pi/2))*exp(-1i*q*r*pi/2); end end X(q+1)=sum(l); end
i got this error Attempted to access x(9); index out of bounds because numel(x)=8. any help
2 个评论
采纳的回答
John Petersen
2012-12-4
编辑:John Petersen
2012-12-4
Your x vector is too short. You are trying to access up to index 7+5 in your equations. Make x 5 elements larger than the largest r index.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!