CurveExpert Basic 2.2.3 documentation

# Creating Custom Models¶

## Introduction¶

Note that you can create custom models at any time; they are saved so that you can use them when you compute nonlinear regressions or functions later, and they appear in the “Custom” part of the nonlinear regression picker when you choose Calculate->Nonlinear Model Fit.

## Custom Models¶

To create a custom model, select Tools->Custom Models. This will show the model manager, which allows you to delete or save custom models.

To get started, simply type the expression for your model into the “Model Equation” field. Do not include “y = ” as a part of your equation; just the expression will suffice.

As you type, CurveExpert Basic will guess how to render your equation, even converting Greek letters into the appropriate representation. The Equation Preview (see Equation Display) shows how your equation will render in CurveExpert. Note that its guess is not adjustable in CurveExpert Basic; in CurveExpert Pro, the advanced code editor can be used to adjust this. Usually the equation rendering is reasonable and correct, but in those cases in which it is not, remember that the rendering does not matter as far as the calculation and mathematics are concerned.

Once your model is written the way that you like, simply hit the Save or Save As button, depending your intent. Give your model a name, and your model will then appear in the list on the left, signifying that it is now available for use within CurveExpert Basic, when you choose to compute nonlinear regressions.

### Mathematical Operations¶

Obviously, the standard arithmetic operations are supported. Multiplication is performed with a `*`, division with `/`, addition with `+`, and subtraction with `-`. Raising a quantity to a power is performed with either `^` or `**`, with the `**` notation being preferred. Grouping is performed with parentheses `()`.

### Reserved Words¶

In any model, the independent variable is always denoted by `x`. This variable is a reserved word and should not be used as a parameter name in your model.

All mathematical functions supported by CurveExpert Basic, such as sin, cos, tan, exp, etc., are also reserved words. See Appendix A: Math Functions for a complete list of the mathematical functions supported.

Any other name that CurveExpert Basic sees in your model is treated as a parameter. This powerful feature lets you name your parameters any name that you find appropriate, such that the model’s syntax carries meaning. Thus, names such as `beta`, `my_long_parameter_name`, and `b` are all legal parameter names. Note also that names are case sensitive; the parameter `a` is distinct from the parameter `A`, for example.