function [area,volume] = cylinder(height, radius)
% -----------------------------------------------------
% cylinder.m
% -----------------------------------------------------
% A function to compute the area and volume of a cylinder.
% -----------------------------------------------------
% Syntax: [area, volume] = cylinder(height, radius)
% Inputs: height = height of the cylinder
%         radius = radius of the cylinder
% Outputs: volume = volume of the cylinder
%          area = surface area of the cylinder
% -----------------------------------------------------
% Notes: none. 
% -----------------------------------------------------
% Copyright and license details available at matlabmarina.com
%------------------------------------------------------

base = pi*radius^2;
volume = base*height;

circumference = 2*pi*radius;
area = circumference*height;
