You are on page 1of 4

Week 1

Basics of oscillations

Exercise 1.1 Structure of a Matlab script and computing a differential equation


Exercise 1.2 Plot a simple graph
Exercise 1.3 Calculate basic parameters of an oscillation
• Preamble
• Description
• Output
• Version
• Revision
1. Definitions
2. Computing
3. Plot

Structure of a Matlab Script


System Model New System Model
x m

c x

m c

Equation of motion
m ∙ xሷ + c ∙ x = 0

Change the system model


Equation of motion
m ∙ xሷ + c ∙ x = 0

Matlab Code
x = dsolve( mass*D2x + stiffness*x == 0 ,x(0)==x_0 ,Dx(0) == x_dot_0, 't');

Using dsolve within Matlab

You might also like