G2A Many GEOs
SHARE
TWEET

FastFurierTransform

a guest Apr 8th, 2020 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function [result] = func8v2_FFT(signal)
  2.     N = length(signal);
  3.     result = zeros(1, N);
  4.    
  5.     if N == 2
  6.         result(1) = signal(1) + signal(2);
  7.         result(2) = signal(1) - signal(2);
  8.     else
  9.         left = signal(1:N/2);
  10.         right = signal(N/2+1:end);
  11.        
  12.         k = 0:N/2-1;
  13.         W = RotateKoef(k, N);
  14.         f = (left + right);
  15.         g = (left - right) .* W;
  16.  
  17.         f = func8v2_FFT(f);
  18.         g = func8v2_FFT(g);
  19.        
  20.         result(1:2:end) = f;
  21.         result(2:2:end) = g;
  22.     end
  23. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top