Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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? thanks luxx
luxx11@gmail.com writes: > 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? I agree with JD's suggestions, as long as your chi-squared space is not too complicated. MPFIT optimizes continuous parameters. What you want is a discrete optimizer, which MPFIT is not. Since you only have one parameter with two possible values it seems easiest to just do as JD suggests and try both possible values and see which is best. Happy fitting, Craig -- ------------------------------------------------------------ -------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response ------------------------------------------------------------ --------------
Thanks JD, I'm doing it that way now. And thanks Craig for MPFIT! luxx.