Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using matlab No Service 10:50 AM Back Laboratory8-1.docx 16. Create a function CvlArea to calculate the surface area of a cylinder (20 r20h) for inputs
Using matlab
No Service 10:50 AM Back Laboratory8-1.docx 16. Create a function CvlArea to calculate the surface area of a cylinder (20 r20h) for inputs of radius and height. Again, assume that radius will be a vector, while height will be a scalar. And test you r function from the command line Paste code here Paste output for (a) Paste output for (b) 17. Open your script file frnm question #11 above and save it under a new name. In addition to the user prompts for min and max values of radius (you will continue to create a vector of 20 radius values from this), add a prompt for the cylinder height. Add function calls to CylVol and CylArea, and use the outputs to calculate the surface-to-volume ratios for the cylinders (note that each function output will be a vector). Finally, get rid of the earlier statements associated with the data file, and instead simply create a plot of surface-to- volume ratio versus radius that contains 2 curves, one for spheres and one for cylinders, both plotted on the same graph. Type help plot for a description of how to do this. Be sure that the plot is properly labeled, and add a legend to identify the curves. Test your program for rmin = 1, ,max = 5, and h = 10, and verify that it works properly. Paste the final successful code and plot below Paste code here Dashboard Calendar To Do Notifications Inbox Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started