From 6a91d7405ca0a750975e6c52b0586d065adad56e Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Sun, 9 Feb 2014 20:34:18 -0500 Subject: [PATCH] covarianceEllipse now returns the matlab handle for the lines object to allow for additional formatting by the user --- matlab/+gtsam/covarianceEllipse.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/+gtsam/covarianceEllipse.m b/matlab/+gtsam/covarianceEllipse.m index 387d7cd12..cdc239bb2 100644 --- a/matlab/+gtsam/covarianceEllipse.m +++ b/matlab/+gtsam/covarianceEllipse.m @@ -1,4 +1,4 @@ -function covarianceEllipse(x,P,color, k) +function h = covarianceEllipse(x,P,color, k) % covarianceEllipse plots a Gaussian as an uncertainty ellipse % Based on Maybeck Vol 1, page 366 % k=2.296 corresponds to 1 std, 68.26% of all probability @@ -13,7 +13,7 @@ s1 = s(1,1); s2 = s(2,2); if nargin<4, k = 2.296; end; [ex,ey] = ellipse( sqrt(s1*k)*e(:,1), sqrt(s2*k)*e(:,2), x(1:2) ); -line(ex,ey,'color',color); +h = line(ex,ey,'color',color); function [x,y] = ellipse(a,b,c); % ellipse: return the x and y coordinates for an ellipse