dissipation in frequency fft

1 vue (au cours des 30 derniers jours)
ayman osama
ayman osama le 4 Déc 2012
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 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 4 Déc 2012
Ayman, Are you trying to program fft algorithm?
ayman osama
ayman osama le 4 Déc 2012
yes it's an assignment to make the function using dissipation in frequency instead of using fft

Connectez-vous pour commenter.

Réponse acceptée

John Petersen
John Petersen le 4 Déc 2012
Modifié(e) : John Petersen le 4 Déc 2012
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.

Plus de réponses (0)

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by