⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex8_35.m

📁 基于WEB与MATLAB编写的信号处理的源码,书名为"应用WEB和MATLAB的信号与系统基础.
💻 M
字号:
% Example 8.35
% step response
num = [1 2 16];
den = [1 4 8 0];
t = 0:10/300:10;
y=step(num,den,t);
plot(t,y)
xlabel('Time (sec)')
ylabel('y(t)')
title('Step Response')
pause
% impulse response
y=impulse(num,den,t);
plot(t,y)
xlabel('Time (sec)')
ylabel('y(t)')
title('Impulse Response')
pause
% response to exponential
x = exp(-2*t);
y=lsim(num,den,x,t);
ya = exp(-2*t).*cos(2*t)-.5*exp(-2*t).*sin(2*t) + 1 - 2*exp(-2*t);
plot(t,y,t,ya,'--')  % ya is actual response from example 7.30
xlabel('Time (sec)')
ylabel('y(t)')
title('Response to exp(-t)')
text(2,.6,'----- Result computed from lsim')
text(2,.5,'- - - Analytical result from Ex. 8.30')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -