zoukankan      html  css  js  c++  java
  • DFT 离散傅里叶变换 与 补零运算

    function [Xk] = dft(xn,N)
    %computes discrete fourier transform
    %---------------------------------------------
    %[Xk] = dft(xn,N)
    %Xk = DFT coeff. array over 0<= k<=N-1
    %xn = one period of periodic signal over 0<= n<= N-1
    % N = Fundamental period of xn
    %
    n = [0:1:N-1];             
    k = [0:1:N-1];             
    WN = exp(-j*2*pi/N);       
    nk = n'*k;                 
    WNnk = WN .^ nk;           
    Xk = xn * WNnk;        

    %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   

    x = [1,1,1,1,zeros(1,32)];
    N = 36;
    X = dft(x,N);
    magX = abs(X);
    angleX = angle(X);

    image

    image

    x = [1,1,1,1,zeros(1,8)];
    N = 12;
    X = dft(x,N);
    magX = abs(X);
    angleX = angle(X);

    image

    image

  • 相关阅读:
    hdu 1.2.4
    交换机&&路由器
    AP、AC、无线路由器
    肩胛骨
    无线路由器
    背部肌肉
    胸部肌肉
    redis未授权访问
    进制
    攻防实验
  • 原文地址:https://www.cnblogs.com/sleepy/p/2095951.html
Copyright © 2011-2022 走看看