Using Funcfit with constrains
IVP
Hi. How can I use /C to add constrains to a custom fitting function?
If I follow the example from "Fitting with Constraints" I get an error saying "expecting fitting function".
Thanks.
Can you post the command you are trying to execute? This error does not sound like some problem with constraints but rather a syntax error. Maybe you don't have the /C flag after your input wave? We need a bit more information to judge what is going on.
October 2, 2022 at 02:03 am - Permalink
Make/O/T/N=2 T_Constraints
T_Constraints[0] = {"K1 > 0","K1 < 65536"}
FuncFit/Q/N=1/X=1/W=2/C=T_Constraints MyFitFunc W_coef MyFitWave
The error I am getting is at /C saying "Expected fitting function"
Thanks.
October 3, 2022 at 06:03 am - Permalink
Make/O/T/N=2 T_Constraints
T_Constraints[0] = {"K1 > 0","K1 < 65536"}
FuncFit/Q/N=1/W=2/X=1 MyFitFunc W_coef MyFitWave /C=T_Constraints
This should work. /C must be behind the MyFitFunc W_coef MyFitWave
October 3, 2022 at 07:02 am - Permalink
Thank you ilavsky. It worked!
October 3, 2022 at 07:36 am - Permalink