Response to "Problems with fitting my own functions"
Marc,
When receiving an error message while fitting, the first thing I do is take a look at the section called Nonlinear Curve Fitting Error Messages in the Origin User's Manual. For versions 4.0/4.1 (English), this section is located on pp. 351-353. In your case, the message you are receiving: "Too many bad data points or functional evaluations" is referenced as error 28039. The information provided for this error message is as follows:
"This happens when there is a zero-divide, the initial parameter values are far from being correct, or the fitting routine is trapped in a wrong paramter region. Check the parameter values. Try to set them [as] close to the correct values [as possible]. Use constraints or fix some parameters to prevent zero-divide or huge exponential terms."
However, since you say that the problem persists even when entering a simple slope/intercept fitting function, I would suspect that this information will be of little help. Therefore, other possible problems should be researched. They are:
- When initializing your parameters, are you making sure to delete the two dashes (--) in the parameter value text boxes?
- When defining the fitting function, are you making sure to use the correct Form? You have a choice between 'Equations', 'Expression', or 'Y-script'. Examples of each are provided above the Definition text box once you select your Form.
- When defining your function, did you make sure to avoid using system variables for parameters, dependent variables, or independent variables? A list of the numeric system variables can be found toward the beginning of the LabTalk manual. It is part of the Keywords section of Chapter 2 (beginning on p. 28 for Origin 4.1 (English) or p. 34 for Origin 5.0 (English)).
- When defining your function and using the default parametes names, did you make sure to start with P1 and then use P2, P3, and so forth without omitting any inbetween?
Those are just some of the things that you would want to confirm. If they do not prove helpful, there are two things I would suggest that you do.
- Check out the May 28th Tech Review articles that specifically target the nonlinear curve fitter.
- If that does not help, contact us here at Technical Support with your problem. Be sure to include a detailed explanation of how you defined the fitting function and how you went about trying to fit your data. Include with that disucssion a copy of the *.FDF file (the fitting function definition file that was created when you created your function...it is held in the FitFunc folder in your Origin directory) and some example data so that we can try the fit here. Also include your Origin Serial Number so that we can confirm that you are a registered user (only registered users are eligible for technical support)
I apologize that I cannot be more specific in offering you a solution, but without knowing how you defined your fitting function or how you are going about trying to fit it, I am somewhat limited in my options.
Sincerely,
Ryan Toomey
Technical Support Engineer
Microcal Software, Inc.
http://www.microcal.com
[This message has been edited by rtoomey (edited 12-17-98).]
[This message has been edited by rtoomey (edited 12-17-98).]
[This message has been edited by rtoomey (edited 12-17-98).]
[This message has been edited by rtoomey (edited 12-17-98).]
[This message has been edited by rtoomey (edited 12-18-98).]
[This message has been edited by rtoomey (edited 12-18-98).]
[This message has been edited by rtoomey (edited 12-18-98).]
[This message has been edited by rtoomey (edited 12-18-98).]
[This message has been edited by rtoomey (edited 08-10-99).]