Chapter 4-3
Chapter 4-3
Chapter 4 (3)
1
[t,x] = ode45(‘function name’, tspan, xspan)
A column vector Name of function file that A row (or column) vector
and n rows evaluates the right side of 1 st containing the initial
containing the order differential equation of conditions of
values of time form : displacements and
starting from t0 velocities for all masses
till tf
2
3
a. Write the mass matrix M, the stiffness matrix K,
the damping matrix C and the force vector F.
4
f. Compare the displacement x1(t) of this system and the
displacement q1(t) if the system is free.
5
The mass matrix M
6
zeros(2,1)
7
Create a function:
function [zdot] = DOF_2 (t , z)
% Define all the needed parameters here
% Write the 1 OD equation
st
end
8
Create a new function where the forces are zeros.
end
9
On the same Script, define new values of initial
conditions (newxspan) where all the values are
zeros.
[tg , r] = ode45(‘DOF_2’,tspan,newxspan)
10
Create a new function where m2 is a global variable
end
11