Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sumReal = 0;
- sumImag = 0;
- z=zeros(1,length(value));
- N = length(value);
- Sum = 0;
- for n = 1:N
- for k = 1:N
- sumReal = sumReal + value(k)*cos(-2*(pi/N)*n*k);
- sumImag = sumImag + value(k)*sin(-2*(pi/N)*n*k);
- end
- z(n) = (sumReal^2 + sumImag^2)^(1/2);
- sumReal = 0;
- sumImag = 0;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement