Using Funcfit with constrains

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.

Make/O/D/N=2/O W_coef
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.

 

Make/O/D/N=2/O W_coef
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