User Defined Equations Q&A¶
How do I add my own equations to TableCurve 2D?¶
There are two options. The main approach consists of user-defined functions which use a simple mathematical syntax and are internally compiled for rapid fitting. Up to 15 user defined functions can be active and fit at any given time. Graphical adjustments allow starting estimates to be highly refined to insure convergence in fitting.
The other option is to create a 32-bit DLL using the C or Fortran language. These are known as TCEX.DLL equations, and you may add up to 100 equations in this fashion. The disadvantages of this approach include the required programming skill and the lack of any graphical means for refining starting estimates. The advantages include the exceptionally fast execution speed such compilations offer, as well as the means to create equations and constraints of unlimited complexity.
If I want to create a User-Defined Function, where do I start?¶
Use the Process menu’s User Functions option to open the UDF dialog. All 15 of the active UDFs are controlled from this one central point. You may wish to load one of the sample UDF libraries (a set of up to 15 UDFs), or a single UDF sample file into the current UDF position. In order to enable an effective compilation of user functions, some simple rules define how a UDF must be expressed. Many of these are evident from the simple inspection of an example UDF. More information is available in the help system and printed documentation.
In the UDF Adjust procedure, what do I do when the UDF curve is not visible?¶
When graphically adjusting UDFs, your starting estimates may be so far off that the UDF curve doesn't even show up with the data. In this case, open the Scaling option for the graph and change the Y priority to Fn. This should allow you to at see the actual UDF, provided it is defined within the X range of the data. Once you have adjusted the parameters to bring the UDF into the Y range of the data, the Find and Update option can often refine the estimates automatically.
Can I have multiple collections of UDFs?¶
Save each set of UDFs as a UDF library and read in the desired UDF library within the User Functions option prior to fitting.
Can I express the minimum and maximum limits for parameters with formulas rather than values?¶
Parameter limits can be specified with formulas rather than values. For example, YMIN and YMAX can be used as the two limits for a parameter.
Is there any advantage to using the built-in non-linear functions within UDFs?¶
These built-in functions will run appreciably faster than the equivalent code within a UDF. These functions also contain conditional code to insure their definition at all values of X.
How do I fit only the UDFs?¶
Use the Curve-Fit User Functions option in the Process menu. The fitting can also be initiated from the main User Functions dialog.