Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer both questions using MATLAB. Will rate! I appreciate you!! Given variable r (radius) and h (height) of a cylinder. Compute the volume of
Please answer both questions using MATLAB. Will rate! I appreciate you!!
Given variable r (radius) and h (height) of a cylinder. Compute the volume of the cylinder and store the result into variable v. Design your code to allow for either scalars or arrays Examples: Input r-3&h-5 Output v-141.3717 Input r-[3 3 3] &h - 5 5.5 6 Output v-[141.3717 155.5088 169.6460] Your Function C Reset MATLAB Documentation 1 function v- CylVolume (r,h) 3%replace the line of below with code that computes the volume of the cylinder(s) with dimensions r & h 5 end Given variable ctemp as your input, convert to Fahrenheit and store the result in variable ftemp Examples Input ctemp is e Output ftemp is 32 Input ctemp is 100 Output ftemp is 212 Your Function 1 function ftempCtoF (ctemp) 2 3 ftemp -ctemp; 4 endStep 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