
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
From ME 2543 (simulation dynamics) course - focused on MatLab programming
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

% example 2.4.3 (falling body)
y_0 = 100; t = 2; g = 32.2;
y = y_0 - 1/2 * g * t^
y = 35.
% example 2.4.4 (ideal gas law)
n = 10; V = 100; T = 400; R = 0.08206; p = (n * R * T) / V
p = 3.
% example 2.4.6 (barbell)
h = 6; R = 3; r = 1.5;
volume_of_spheres = (4/3 * pi * R^3) * 2; volume_of_cylinder = pi * r^2 * h;
total_volume = volume_of_spheres + volume_of_cylinder
total_volume = 268.