Hi, how would you code this in MATLAB?
1. Calculate using basic arithmetic operators:
a.
34 - 6 * 2.5 + 14 + 23
2. Calculate using basic arithmetic operators and basic built-in functions: log10(36) + log2(8) + sqrt(64) + 3
b.
log(12)
(Hint: use the MATLAB help command to learn about the exp & log functions)
3. Define the variables x = 6, y = -14, z = 2 * x + y and calculate
a. x + abs(y) - z
(Hint: use the MATLAB help command to learn about the abs function.)
b. y + x^2
4. Prompt the user for two values, both in meters, representing the lengths of the catheti or legs (non-hypotenuse sides) of a right-angle triangle. Then compute the length of the hypotenuse of this triangle and display the length of the hypotenuse in the command window
(Hint: Remember our good friend Pythagoras)