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

📄 ex5_17.m

📁 Programs for the book Advanced Engineering Mathematics using MATLAB, 2ndEd.
💻 M
字号:
% EX5_17.M Step response of second order differential equation
%  D2y + 2*z*Wn*Dy + Wn^2*y=U(t) for underdamped and critically
%   damped system ; z=2/Wn and z=1, wn=sqrt(40) 
clear                % Clear workspace and
clf                  %  figures
Wn=sqrt(40)          % Natural frequency - radians/second
z1=2/Wn              % Damping
t=[0:.005:5];        % Time for plotting
y1=.2453*( 1 -(1/3)*exp(-2*t).*sin(6*t)-exp(-2*t).*cos(6*t)); 
ycrit=.2453*( 1-(1 + Wn*t).*exp(-Wn*t)); 
plot(t,y1,'-',t,ycrit,'-.')
axis([0,5,0,.5])     % Set plotting limits
xlabel('Time in seconds')
ylabel('y(t)')
title('Step Response of Second Order D.E.')
legend('z=.3162','z=1.0')
%
% Version 5  legend (lower case)
 

⌨️ 快捷键说明

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