zoukankan      html  css  js  c++  java
  • 第三章 信号系统分析基础sigexp本函数实现绘制复指数信号时域波形

    第三章 信号系统分析基础

    Contents

    3.1 概述

    • 单位阶跃信号
    • 单位脉冲信号
    • 三角信号
    • sinc信号
    • 复指数信号
    % 绘制复指数信号 : sigexp.m
    sigexp(3,-0.3,5,-5,5)
    


    sigexp.m文件内容.

    ===========================

    Contents

    function sigexp( a,s,w,t1,t2 )
    

    SIGEXP Summary of this function goes here

    Detailed explanation goes here
    本函数实现绘制复指数信号时域波形

    Parameters

    • a :复指数信号幅度
    • s :复指数信号频率实部
    • w :复指数信号频率虚部
    • t1,t2 :绘制波形的时间范围

    复指数的各个部分

    t = t1:0.01:t2;
    theta = s +j*w;
    fc = a*exp(theta*t);        % 复指数表达式
    real_fc = real(fc);         % 实部
    imag_fc = imag(fc);         % 虚部
    mag_fc = abs(fc);           % 绝对值
    phase_fc = angle(fc);       % 相位
    
    Input argument "t1" is undefined.
    
    Error in ==> sigexp at 18
    t = t1:0.01:t2;
    

    绘制实部

    subplot(2,2,1)
    plot(t,real_fc)
    title('实部');
    xlabel('t');
    axis([t1,t2,-(max(mag_fc)+0.2),max(mag_fc)+0.2]);
    

    绘制虚部

    subplot(2,2,2)
    plot(t,imag_fc)
    title('虚部')
    xlabel('t')
    axis([t1,t2,-(max(mag_fc)+0.2),max(mag_fc)+0.2]);
    

    绘制模

    subplot(2,2,3)
    plot(t,mag_fc)
    title('模')
    xlabel('t')
    axis([t1,t2,0,max(mag_fc)+0.5])
    

    绘制相角

    subplot(2,2,4)
    plot(t,phase_fc)
    title('相角')
    xlabel('t')
    axis([t1,t2,-(max(mag_fc)+0.2),max(mag_fc)+0.2]);
    
    end
    
  • 相关阅读:
    MyString
    Django疑难问题
    mysql 疑难问题-django
    python时间转换 ticks-FYI
    django建议入门-FYI
    Python风格规范-FYI
    scrum敏捷开发☞
    git基本命令
    centos下的安装mysql,jdk
    memcached for .net on windows
  • 原文地址:https://www.cnblogs.com/xilifeng/p/2666732.html
Copyright © 2011-2022 走看看