When someone stands on a diving board it bends, and the amount of deflection depends on
factors such as the beam's length, cross-sectional shape, material properties, and the magnitude
of the load. A cantilever beam, like the diving board, is a structure with one end fixed and the
other end free. The deflection y in (m) of the beam can be calculated using this equation:
$\frac{F}{6EI}(3x^2L - x^3)$
where F: load (N), E: modulus of elasticity (Pa), I: moment of inertia (m$^3$), L: beam length (m),
x: is the location of the deflection from the support (m)
Requirements:-Using M-files (both script and function files), calculate the deflection y in mm:
For the script file:
1- Ask the user to input F, E, I, L, and x, one by one.
2- Display using \"fprintf\" the deflection value to the user after all the parameters are entered.
3- Ask the user if he wants to try again or exit.
4- The script should run continuously until the user exits by entering \"0\".
For the function file:
1- The function should be \"Five Inputs, and One output to the workspace\".
2- The function should calculate the deflection if all the values entered are positive,
otherwise the output will be '0' and display an error message.
Hint: When F = 1000, E = 83 x 10$^10$, I = 444 x 10$^{-5}$, L = 10, and x = 4.25; y = 210 mm