function [a, b, theta] = sym2par(A) % [a, b, theta] = sym2par(A) % % DESC: % computes the semiaxis a, b and rotation angle theta of the ellipse % represented by the symmetric matrix A % % AUTHOR % Marco Zuliani - zuliani@ece.ucsb.edu % % VERSION: % 1.0 % % INPUT: % A = symmteric matrix such that x'*A*x % % OUTPUT: % a, b = ellipse semiaxis % theta = rotation angle (counterclock-wise) [V D] = svd(A); a = 1/sqrt(D(1,1)); b = 1/sqrt(D(2,2)); theta = atan2(V(2,1), V(1,1)); return