📄 odesmd.mht
字号:
From: <Saved by Windows Internet Explorer 7>
Subject:
Date: Tue, 12 May 2009 09:53:33 -0700
MIME-Version: 1.0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Content-Location: http://www.mece.ualberta.ca/Courses/mec390/390code/odesmd.m
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY><PRE>function fvec = odesmd(t,x);
% RHS of ODE for forced SDOF spring-mass-damper system
%
% The state vector x contains:
% x(1) = velocity
% x(2) = position
%
% The output vector contains:
% fvec(1) = acceleration
% fvec(2) = velocity
m = 100; % mass
c = 50; % damping coefficient
k = 1000; % spring constant
omega = 5; % forcing frequency (rad/s)
F0 = 0; % forcing magnitude
F = F0*sin(omega*t); % forcing function
fvec = zeros(2,1);
fvec(1) = (F - c*x(1) - k*x(2))/m;
fvec(2) = x(1);
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -