Matlabhandout 03
Matlabhandout 03
Handout 03
4. Create a vector for x over the range −2𝜋 ≤ 𝑥 ≤ 2𝜋. Use a MATLAB script file to plot
both sinh(x) and (𝑒 𝑥 − 𝑒 −𝑥 )/2 to show that they are the same function.
5. Create a vector for x over the range 1 ≤ 𝑥 ≤ 10𝜋. Use a MATLAB script file to plot both
cosh−1 (𝑥) and ln(𝑥 + √𝑥 2 − 1) to show that they are the same function.
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 a MATLAB script file to plot the capacitance over
the range of d for L = 1 m and r = 0.001 m.
7. When a belt is wrapped around a cylinder, the relation between the belt forces on each
side of the cylinder is
𝐹1 = 𝐹2 𝑒 𝜇𝛽
where β is the angle of wrap of the belt in radians and µ is the friction coefficient. Create
a vector for β over the range 10 ≤ 𝛽 ≤ 720°. Use a MATLAB script file to plot the force
𝐹1 over the range of β for µ = 0.3 and 𝐹2 = 100 N. (Hint: Be careful with β!)
9. Create a function file that accepts temperature in degrees Fahrenheit (°F) and computes
the corresponding value in degrees Celsius (°C). The relation between the two is
5
𝑇°C = (𝑇°F − 32)
9
Create a Calling Script File to plot the temperature in °C versus the temperature in °F
over the range 0 ≤ 𝑇 ≤ 250°F.
10. An object thrown vertically with a speed v0 reaches a height h at time t, where
1
ℎ = 𝑣0 𝑡 − 𝑔𝑡 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.
11. function file that accepts temperature in degrees Fahrenheit (°F) and computes