function A = par2sym(a, b, theta)

% A = par2sym(a, b, theta)
%
% DESC:
% computes the symmetric 2x2 matrix which represents an ellipse with
% semiaxis a, b and rotation angle theta
%
% AUTHOR
% Marco Zuliani - zuliani@ece.ucsb.edu
%
% VERSION:
% 1.0
%
% INPUT:
% a, b              = ellipse semiaxis
% theta             = rotation angle (counterclock-wise)
%
% OUTPUT:
% A                 = symmteric matrix such that x'*A*x

D = [1/a^2 0; 0 1/b^2];
c = cos(theta);
s = sin(theta);
R = [c s; -s c];
A = R'*D*R;

return