Re: Parameters and MPFIT [message #46653] |
Thu, 08 December 2005 08:14 |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 08 Dec 2005 03:11:08 -0800, luxx11 wrote:
> Hi, I'm using MPFIT and MPFITFUN from Craig Markwardt.
>
> I have one parameter which can be -1 or 1, nothing else, but I'm having
> problems to do this with PARINFO.
>
> Probably there is an easier way to do it but I am setting limits=[-1,1],
> then I set the min and the max step to 2. I thought that this would do
> keep this parameter in -1 or in 1, but I get values like 0.8 or 0.9. Any
> ideas?
Call MPFITFUN twice, once with parameter -1 fixed, once with 1 fixed, and
compare the resulting Chi-square. Or alter your code such that [-1,0]
maps to -1, and [0,1] maps to 1. This method is fairly rude, because the
fitter will take tiny steps looking for any change, and finding none, may
get quite confused.
JD
|
|
|