source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/ellipplot.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 463 bytes
Line 
1function [xe,ye]=ellipplot(P,gamma,ecolor,xc)
2%DUAL2CELL Internal function for plotting ellipsoid
3
4% Author Johan Löfberg
5% $Id: ellipplot.m,v 1.2 2004/07/02 08:17:30 johanl Exp $
6
7if nargin<4
8   xc = zeros(length(P),1);
9end
10
11if nargin<3
12   ecolor = [1 0 0];
13end
14
15if nargin<2
16   gamma = 1;
17end
18
19P=P/gamma;
20P=chol(P);
21
22theta = linspace(-pi,pi,100);
23z = [cos(theta); sin(theta)];
24
25x = inv(P)*z;
26for n=1:length(x)
27  x(:,n)=x(:,n)+xc;
28end;
29
30fill(x(1,:),x(2,:),ecolor)
Note: See TracBrowser for help on using the repository browser.