ME 1020 Engineering Programming with MATLAB...
Transcript of ME 1020 Engineering Programming with MATLAB...
ME 1020 Engineering Programming with MATLAB
Chapter 3 Homework Solutions: 3.4, 3.6, 3.10, 3.12, 3.16, 3.18, 3.24
Problem 3.4:
Create a vector for x over the range −2𝜋 ≤ 𝑥 ≤ 2𝜋. Use MATLAB to plot both sinh(x) and
(𝑒𝑥 − 𝑒−𝑥)/2 to show that they are the same function.
Problem 3.6:
The capacitance of two parallel conductors of length L and radius r, separated by a distance d in
air, is given by
𝐶 = 𝜋𝜖𝐿
ln[(𝑑 − 𝑟)/𝑟]
where 𝜖 is the permittivity of air (𝜖 = 8.854 × 10−12 F/m). Create a vector for d over the
range 0.002 ≤ 𝑑 ≤ 0.010 m. Use MATLAB to plot the capacitance over the range of d for L =
1 m and r = 0.001 m.
Problem 3.10:
An object thrown vertically with a speed v0 reaches a height h at time t, where
ℎ = 𝑣0𝑡 −1
2𝑔𝑡2
Create a Function File that computes the height h as a function of time 𝑡 for 𝑔 = 9.81 m/s2 and
𝑣0 = 50 m/s. Create a Calling Script File to plot the height versus the time 𝑡. Determine the
time when the object hits the ground using the fzero command.
Problem 3.12:
Problem setup:
𝐴 = 𝐿𝑊 +1
2𝐷2
𝐷2 + 𝐷2 = 𝑊2
2𝐷2 = 𝑊2
𝐷 =𝑊
√2;
1
2𝐷2 =
1
4𝑊2
𝐴 = 𝐿𝑊 +1
4𝑊2
𝐿 =1
𝑊(𝐴 −
1
4𝑊2)
𝐿total = 𝑊 + 2𝐿 + 2𝐷
Problem 3.16:
Problem 3.16: Scott Thomas
torus(a,b): a = inner radius (in); b = outer radius (in)
Problem 3.18:
Problem 3.18: Scott Thomas
Problem 3.24: