Question: PLEASE CODE ON MATLAB Generate a function file that calculates the volume of a right circular cone Volume = 1 3 r 2 h and
PLEASE CODE ON MATLAB
Generate a function file that calculates the volume of a right circular cone Volume and the Surface Area Note that according to the figure to the right, is the base radius and is the height. Your function must meet the following requirements for full points:
a Must be a function with inputs radius and height and outputs surface area and volume
b The user can input a range of radius values from the
Figure Right Circular Cone with a radius and a height when running your function and the user will be required to input a constant height.
i Design your function so that the radius can be inputted as an array and your height will remain constant. That means you need to do proper index multiplication.
c The output of volumes and surface areas should be outputted in the Command Window
d A subplot should be generated that shows:
i Subplot : Only the Surface area is plotted as a function of radius with a constant height the user inputted.
ii Subplot : Only the Volume is Plotted as a function of radius with the same constant height the user inputted.
iii. Subplot : Both the surface area and volume as a function of radius on the same figure. Use a constant height for both.
e The plot must be properly labeled
Should have labels on the axis, axis, a title, a legend. Decide what units of measurement you want to use inches meters, etc
f The data points should be unique in style and color
g Each line of the code should be commented
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
