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
    
  • 相关阅读:
    一个比喻理解进程和线程的区别
    python蛋疼的编码decode、encode、unicode、str、byte的问题都在这了
    python类中__unicode__和__str__方法的妙用
    python re 正则提取中文
    一个python爬虫协程的写法(gevent模块)
    python 中range和xrange的区别
    python 监控oracle 数据库
    Spring security 知识笔记【自定义登录页面】
    Spring security 知识笔记【内存角色授权】
    Spring security 知识笔记【入门】
  • 原文地址:https://www.cnblogs.com/xilifeng/p/2666732.html
Copyright © 2011-2022 走看看