caus.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 27 行
M
27 行
%==================================================
% Name: caus.m
% This program is used to obviouse the relationship
% between a non-causal signal and a causal signal.
% and make non-causal signal in to causal signal
% by multiplying the unit step function .
%==================================================
clear;
t=-4:0.01:4;
t0=input('输入第一个t0=');
t1=input('输入第一个t0=');
t2=input('输入第一个t0=');
x1=exp(-abs(t));
x2=exp(-abs(t)).*u(t-t0);
x3=exp(-abs(t)).*u(t-t1);
x4=exp(-abs(t)).*u(t-t2);
clf;
subplot(4,1,1);
plot(t,x1);axis([-4,4,-0.3,1.2]);grid on;
subplot(4,1,2);
plot(t,x2);axis([-4,4,-0.3,1.2]);grid on;
subplot(4,1,3);
plot(t,x3);axis([-4,4,-0.3,1.2]);grid on;
subplot(4,1,4);
plot(t,x4);axis([-4,4,-0.3,1.2]);grid on;
%==================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?