MATLAB: Write a local function that calculates the volume of cylinders. Pass the cylinder height and radius to the function and have the function return the volume. Write a separate script that creates a variable that contains the height of the cylinder and another variable that contains the radius. Have the script call the function to get the volume and then the script should display the volume as cylinderVolume = xxx where xxx is the volume. Four decimal places is sufficient. The volume of a cylinder is the base area times the height.
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”
"Is this question part of your assignment? We Can Help!"