Due: Mondays, 2/4 ; Wednesdays, 2/1
NOTE: Solve all problems in a single .m file and submit it to Canvas when you are done.
The Brinell hardness test consists of indenting an spherical tip into the sample material and
using the size of the indentation to calculate the magnitude of the material’s hardness. The
formula used to obtain the hardness is: 𝐻𝐵 =
where, L is the applied load, D is the diameter of the indentor and d is the diameter of the
indentation. For a load of 3000 kg, an indentor diameter of 10 mm and an indentation diameter
of 7.2 mm, write a Matlab program in an .m file that performs the following tasks:
First define the parameters above and print in the command window the values of L, D and d
such as: The load applied in kg is 3000. The diameter of the indentor is….
Then calculate the Brinell hardness based on the formula provided above and print the result in
the command window.
Given 𝐴 = .5
𝑒 5.7 9 ,
a) Solve the following system of equations: 𝐴 .𝑥$ 9 = .−19
b) Calculate the inverse of A.
c) Multiply the last two rows element by element.
d) Calculate the natural logarithm of the first column of A.
Plot the following function 𝐹 = 5)> +, where s represents position and F is force. F should be in
the y-axis and position s in the x-axis. Use a position range going from -10 to 10. Make sure you
use enough points so that the curve looks smooth. In the same figure, plot this other function,
𝑒 ) AB for x going from -8 to 8. Use a different color and line style for this second
Let’s try to manage some of the traffic lights in an 4 way intersection. We will focus just on one
direction. If there’s a car on the left lane, turn both lights (the arrow and the circle) green. If
there’s a car on the right lane and no cars on the left lane, turn the circle light green and keep
the arrow red. If there are no cars, keep both lights red. Pretend you can turn on/off the lights
by just sending written commands using fprintf.
The cost of electricity varies depending on the time of the day. We want to calculate the cost of
using a machine for certain hours each day. Write a program to calculate such cost. We will
input the time we turn the machine on and the time we turn it off. Based on this, your program
has to calculate the total cost of electricity. The machine uses 125,000 W (watts). The cost of
electricity is given below:
6AM – 11:59AM
12PM – 8:59PM
9PM – 11:59PM
Calculate the cost for the following cases:
a) On at 7AM, off at 10PM
b) On at 9AM, off at 4AM
c) On at noon, off at midnight
Cost ($ per kWh)
Purchase answer to see full