function [outx,outy]=rot(theta,x,y)

% function [outx,outy]=rot(theta,x,y)

%

% This function does a rotation of coordinate axis

% according to the formula

% x'=xcos(t)+ysin(t) and y'=-xsin(t)+ycos(t)

% where the prime denotes the new coordinates

%

% Expects "theta" in degree clockwise

% as in the old "REDUCE" program 

% and converts to radians counterclockwise

% to be compatible with the standard formula

%

theta=theta*(-1.);

theta=(theta/180.)*pi;

outx=x.*(ones(length(x),1)*cos(theta))+y.*(ones(length(y),1)*sin(theta));

outy=(-1.)*x.*(ones(length(x),1)*sin(theta))+y.*(ones(length(y),1)*cos(theta));



