[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ellipse
From: |
Søren Hauberg |
Subject: |
Re: ellipse |
Date: |
Sat, 31 Jan 2009 11:55:20 +0100 |
fre, 30 01 2009 kl. 11:38 -0500, skrev John W. Eaton:
> BTW, is there a good reason that you switched the order of the N and
> SHIFT arguments from the original? That change will break all the
> code that the original author (my former boss) wrote that uses this
> function. I don't mind making the switch if there is a good reason,
> but it's not immediately obvious to me what that might be.
Honestly, I can't really remember what I thought at the moment...
That being said, I actually think it makes sense to put 'shift' before
'n'. I use this function to plot covariances of data, where the code
roughly look like this
mu = mean (data);
C = cov (data);
ellipse (inv (C), 2, mu);
It is quite rare that I want to change the number of points on the
ellipse as 100 is most often a perfectly fine value. It is however very
common the my data has a non-zero mean value. So, I see myself using a
non-default value of 'shift' much more often than a non-default value of
'n'. Therefore I think 'shift' should appear before 'n'.
That being said, it's not an important issue for me, so I don't mind
swapping things back. Alternatively, we could add something like
if (isvector (n) && isscalar (shift))
tmp = n;
n = shift;
shift = tmp;
endif
to allow both styles.
Soren
- ellipse, John W. Eaton, 2009/01/29
- Re: ellipse, Søren Hauberg, 2009/01/30
- Re: ellipse, John W. Eaton, 2009/01/30
- Re: ellipse,
Søren Hauberg <=
- Re: ellipse, John W. Eaton, 2009/01/31
- Re: ellipse, Søren Hauberg, 2009/01/31
- Re: ellipse, John W. Eaton, 2009/01/31
- Re: ellipse, Kai Habel, 2009/01/31
- Re: ellipse, Søren Hauberg, 2009/01/31
- Re: ellipse, Kai Habel, 2009/01/31
- Re: ellipse, Søren Hauberg, 2009/01/31
- Re: ellipse, Daniel J Sebald, 2009/01/31