Advertisement
Guest User

Untitled

a guest
Jun 17th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. sumReal = 0;
  2. sumImag = 0;
  3. z=zeros(1,length(value));
  4. N = length(value);
  5. Sum = 0;
  6. for n = 1:N
  7. for k = 1:N
  8. sumReal = sumReal + value(k)*cos(-2*(pi/N)*n*k);
  9. sumImag = sumImag + value(k)*sin(-2*(pi/N)*n*k);
  10. end
  11. z(n) = (sumReal^2 + sumImag^2)^(1/2);
  12. sumReal = 0;
  13. sumImag = 0;
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement