zoukankan      html  css  js  c++  java
  • DSP using MATLAB示例 Example3.5

    代码:

    n = [0:10]; x = (0.9*exp(j*pi/3)).^n;       % x(n) = 
            
    k = -200:200; 
    w = (pi/100)*k;              % [0,pi] axis divided into 101 points.
    X = x * (exp(-j*pi/100)) .^ (n'*k);
    
    magX = abs(X); angX = angle(X); realX = real(X); imagX = imag(X);
    
    set(gcf,'Color','white'); 
    subplot(2,2,1); plot(w/pi,magX); grid on; 
    title('Magnitude Part');
    xlabel('frequency in pi units'); ylabel('Magnitude  |X|'); 
    subplot(2,2,3); plot(w/pi, angX/pi); grid on;
    title('Angle Part');
    xlabel('frequency in pi units'); ylabel('Radians/pi');
    
    subplot('2,2,2'); plot(w/pi, realX); grid on;
    title('Real Part');
    xlabel('frequency in pi units'); ylabel('Real');
    subplot('2,2,4'); plot(w/pi, imagX); grid on;
    title('Imaginary Part');
    xlabel('frequency in pi units'); ylabel('Imaginary');
    

    结果:

    牢记: 1、如果你决定做某事,那就动手去做;不要受任何人、任何事的干扰。2、这个世界并不完美,但依然值得我们去为之奋斗。
  • 相关阅读:
    ICS SIP Call移植
    ubuntu常用软件安装
    ubuntu开机自动设置屏幕亮度
    书摘《苹果是方的》
    dbml 添加时自动生成 Guid & DataTime
    English 中有趣的a和d
    asp.net 生成ul控件
    lambda c# 3.0
    0809 END Lakers
    linq c# 3.0
  • 原文地址:https://www.cnblogs.com/ky027wh-sx/p/6052209.html
Copyright © 2011-2022 走看看