problem 1) prepare a Matlab program that would allow the user to determine area and circumference of the circle. Selections and data entry would be done by presenting the user with the menu (using menu function) and provide her/him with the following choices:
a) Enter the radius
b) Display the area
c) Display the circumference
d) Exit
Other Requirements:
a) Selecting choice 2 or 3 before entering the radius would result in the error message.
b) The program would terminate only when Exit has been selected
c) Calculations would be done by functions.
d) Function circleInfo() would ask for the radius and will return it.
e) Function circleArea() would accept a parameter, the radius, and returns area.
f) Function circleCircum() would accept a parameter, the radius, and returns circumference.
g) Results are displayed with 2 decimal place accuracy.
problem 2) prepare the Matlab program that would allow the user to enter coefficients of a polynomial and make some computations.
Selections and data entry would be done by presenting the user with a menu (using menu function) and provide her/him with the following choices:
Enter degree and coefficients of the polynomial
Evaluate polynomial at a user defined point
Display roots of the polynomial
Exit
Other Requirements:
a) Selecting choice 2 and 3 before entering degree and coefficients would result in an error message.
b) The program would terminate only when Exit has been selected
c) Calculations would be done by functions.
d) Function polynomial() would ask for the degree and the coefficients of the polynomial and would return the coefficients.
e) Function polyEval() would accept a parameter, the evaluation point, and returns the value of the polynomial at that point.
f) Function polyRoots() would accept the coefficients and returns the roots.
g) Results are displayed with 2 decimal place accuracy.