Write a function to calculate the volume and surface area of a hollow cylinder. It receives as input arguments the radius of the cylinder base and the height of the cylinder. The volume is given by r2 h, and the surface area is 2 r h
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:6| Question number:4.6
All Answers
total answers (1)
vol_surfarea.m
function [vol, surfarea] = vol_surfarea(rad, ht)
% Calculates the volume and surface area of a
% hollow cylinder, given the radius and height
% Format of call: vol_surfarea(radius, height)
% Returns volume then surface area
vol = pi * rad^2 * ht;
surfarea = 2 * pi * rad * ht;
end
Satellite navigation systems have become ubiquitous. Navigation
systems based in space such as the Global Positioning System (GPS)
can send data to handheld personal devices. The coordinate systems
that are used to represent locations present this data in several
formats.
need an explanation for this answer? contact us directly to get an explanation for this answer