help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: fitting 2d normal distribution


From: Hall, Benjamin
Subject: RE: fitting 2d normal distribution
Date: Wed, 22 Oct 2008 11:53:14 -0400

|-----Original Message-----
|From: John W. Eaton [mailto:address@hidden 
|Sent: Wednesday, October 22, 2008 10:43 AM
|To: Francesco Potorti`
|Cc: Octave users list
|Subject: Re: fitting 2d normal distribution
|

|
|Does the following function do (at least part of) what you want?  For
|example:
|
|  tmp = rand (2);
|  amat = tmp'*tmp;  %% matrix must be positive definite
|
|  [x, y, major, minor, bbox] = ellipse (amat, 0.95);
|
|  plot (x, y, major(:,1), major(:,2), minor(:,1), minor(:,2), 
|bbox(:,1), bbox(:,2));
|  axis ("square");
|
|jwe
|
|

That's nice.  Here's a version (and patch) that allow you to specify multiple 
"level" values which might be handy if you are trying to represent probability 
density contours.

Ben

Attachment: ellipse.m
Description: Binary data

Attachment: thediff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]