(MATLAB QUESTION)
function [ volume , area ] = cylinderInfo( height , radius
)
%
%
end
function [ volume ] = calcVolume( height , radius )
%
%
function [ area ] = calcSurfArea( height , radius )
%
%
end
%calcVolume.m
function [volume] = calcVolume(height,radius)
volume=pi*radius*radius*height;
end
============================================================================================
%calcSurfArea.m
function [area] = calcSurfArea(height,radius)
area= 2*pi*radius*(radius+height);
end
============================================================================================
%cylinderInfo.m
function [volume,area] = cylinderInfo(height,radius)
volume=calcVolume(height,radius);
area=calcSurfArea(height,radius);
end
============================================================================================
Output

(MATLAB QUESTION) function [ volume , area ] = cylinderInfo( height , radius ) %...
(MATLAB QUESTION) How to modify this function?
function [ varargout ] = ellipsoidInfo( varargin )
% enter code/comments here
end
4.4 Advanced Functions Modify ellipsoidinfo.m, so that the function returns some information about an ellipsoid (or sphere) depending on the user's supplied input and expected output If the user supplies one input, the function will calculate information for a sphere If the user supplies three inputs, the function will calculate information for an ellipsoid. The user would supply the values...
Write a user-defined MATLAB function that will calculate the area/volume of a shape whose dimensions are given by the user. This function will be able to calculate the area for 2D objects like a triangle or a rectangle and 3D objects such as a box. The name of the function will be findArea and it will have four input arguments. The first input argument will be the length. The second input argument will be the width. The third input argument...
6. Consider a cylinder with a surface area of 2 m2. Find the radius r and height h of such a cylinder so that the volume of the cylinder is a maximum. Given: For a cylinder, the surface area is S = 2^r2 + 2trh and the volume is V = arh (where r is the radius and h is the height of the cylinder). I (5)
Write a program that asks the user to input the radius and height of a cylinder and the unit weight of the material (in pounds per square feet). The program computes the surface area of the cylinder and the total weight of the cylinder. The program uses two functions: One function to read the data from the keyboard, the other function to calculate the surface area and the weight of the cylinder. The weight of the cylinder is printed from...
Using MATLAB
18. A cylinder with base radius r and height h is con- structed inside a sphere such that it is in contact with the surface of a sphere, as shown in the figー ure. The radius of the sphere is R- 11 in. (a) Create a polynomial expression for the vol- / >1 ume V of the cylinder in terms of h. (b) Make a plot of V versus h for 0 shs11 in. (c) Using the roots...
QUESTION 4 Find the surface area of a cylinder with a radius of 3 and a height of 10. The surface area is TT units (Do not use pi in your answer as it is already written with the units above) QUESTION 5 Find the volume of a cone with a radius of 6 and a height of 8. The volume is IT units (Do not use pi in your answer as it is already written with the units above)...
question on matlab. this is for a function. the question is "write a function called tri_area that returns the area of a triangle with base b and height h, where b and h are input arguments of the function in that order "
MatLab question, please answer in matlab. %{ Write a function that prints the area and circumference of a circle for a given radius. Only the radius is passed to the function. The function does not return any values. The area is given by pi*r^2 and the circumference is 2*pi*r. The function is called areaCircum. Example: areaCircum(input value) %} % Place your function call here
Exercise 1: A circle is defined by its radius (we are not interested in its center). A cylinder is defined by circle and height. Design and implement a class called Circle that has the necessary attributes to describe it and at least the following member methods: setRadius( ), getRadius( ), Circumference( ), Area( ), Display( ), and two constructors, one is parameterized constructor and another empty constructor with default zero value. Design and implement a class called Cylinder...
find the surface area and volume of a right cylinder, closed
at both end
8. Find the surface area and volume of a right cylinder, closed at both ends, with a base circumference of 8 in. and a height of 12 in. Find the surface area and the volume of the cylinder, Round your answer to the nearest whole number. Surface Area = Volume =