From 3bad1346d6ee276f8e89ea5ef06ad708c1d710b7 Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Fri, 8 Jun 2012 22:34:03 +0000 Subject: [PATCH] matlab plotPose3: don't draw covariance if it's empty --- matlab/plotPose3.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/plotPose3.m b/matlab/plotPose3.m index d55b7323a..262d1dfc1 100644 --- a/matlab/plotPose3.m +++ b/matlab/plotPose3.m @@ -20,7 +20,7 @@ L = [C zAxis]'; line(L(:,1),L(:,2),L(:,3),'Color','b'); % plot the covariance -if nargin>2 +if (nargin>2) && (~isempty(P)) pPp = P(4:6,4:6); % covariance matrix in pose coordinate frame gPp = gRp*pPp*gRp'; % convert the covariance matrix to global coordinate frame covarianceEllipse3D(C,gPp);