{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

EGR_102_Lab_07A_Solution

# EGR_102_Lab_07A_Solution - Lab 07A Homework Solution...

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
Part 2 The function was saved as PipeFlow_Subplot.m function PipeFlow_Subplot(D,Q)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}