%
%   Book: MATLAB-Based Electromagnetics (Pearson Prentice Hall)
%   Author: Branislav M. Notaros
%   Instructor Resources
%   (c) 2011
%
%   This MATLAB code or any part of it may be used only for 
%   educational purposes associated with the book
%
%
%

function [R,THETA,PHI] = cyl2Sph(r,phi,z)
R = sqrt(r^2 + z^2);
THETA = atan(r/z);
PHI = phi;