This preview shows pages 1–2. Sign up to view the full content.
Lab 07A Homework
Solution
Section 1
Part 1
The script was saved as Oscillations.m
% Script Oscillations.m
% Name, Section #
% Script calculates the displacement vs. time for two shock systems, then
% plots the results to determine which system is best
% Time vector
t = 0:0.2:20;
% s
% System 1
m1 = 40;
% kg
k1 = 80;
% kg/s^2
c1 = 10;
% kg/s
x1 = exp((c1*t)/(2*m1)).*sin(sqrt(k1/m1)*t);
% cm
% System 2
m2 = 40;
% kg
k2 = 15;
% kg/s^2
c2 = 5;
% kg/s
x2 = exp((c2*t)/(2*m2)).*sin(sqrt(k2/m2)*t);
% cm
plot(t,x1,
'.g'
,t,x2,
'.r'
)
title(
'Oscillations of two automotive shock systems'
)
xlabel(
'Time (sec)'
)
ylabel(
'Displacement (cm)'
)
legend(
'System 1'
,
'System 2'
)
grid
on
Command Window Output
>> run Oscillations
Based on the plot:
The first system results
in smaller, fast
oscillations.
The second system results
in larger, but slower
oscillations.
0
2
4
6
8
10
12
14
16
18
20
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Oscillations of two automotive shock systems
Time (sec)
Displacement (cm)
System 1
System 2
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/03/2012 for the course EGR 102 taught by Professor Hinds during the Spring '09 term at Michigan State University.
 Spring '09
 HINDS

Click to edit the document details