function [x,y] = xycoord(r, az)
% XYCOORD  Polar to rectangular coordinate conversion, geographic convention
%
% function [u,v] = xycoord(speed, sdir)
% function [x,y] = xycoord(r, az)
%
% Converts from speed, azimuth polar coordinates (0-360 degrees)
% to rectangular coordinates. (Note: use of dir for direction conflicts
% with DOS/MATLAB dir command!)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use of this program is self described.
% Program written in Matlab v7.1.0 SP3
% Program ran on PC with Windows XP Professional OS.
%
% "Although this program has been used by the USGS, no warranty, 
% expressed or implied, is made by the USGS or the United States 
% Government as to the accuracy and functioning of the program 
% and related program material nor shall the fact of distribution 
% constitute any such warranty, and no responsibility is assumed 
% by the USGS in connection therewith."
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%

% Chris Sherwood, USGS
% March 17, 1999

rd = 57.29577950;
x = r .* sin(az/rd);
y = r .* cos(az/rd);
return


