Load fit results from report sheet into a tree
1. getnlr tt FitNL1!; // get nlfit tree from report sheet fitnl1, and name the nlfit tree as tt 2. getnlr myfit iw:=[Book1]FitNL1 p:=1; //assume your source book is Book1, name nlfit tree as myfit
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Output tree | tr |
Output TreeNode |
|
Controls the name of the generated report tree |
Report sheet | iw |
Input Worksheet |
|
Indicates which report tree to copy. |
Show All Treenodes | showall |
Input int |
|
Controls which treenodes appear in the report sheet. |
Notation of Parameters | pnotation |
Input int |
|
Notation of parameters in the output tree.
Option list:
|
Users can use getnlr to get nlfit tree from a fitting results report sheet.
// Prepare the nonlinear curve fitting result which can be read by "getnlr" string path$ = system.path.program$ + "Samples\Curve Fitting\Single Peak Fit.ogw"; doc -a %(path$); // Partial import of data string fname$ = system.path.program$ + "Samples\Curve Fitting\Gaussian.dat"; impAsc options.partImp.partial:=1 options.partImp.firstCol:=1 options.partImp.lastCol:=2 orng:=Data!; run -p au; // Force all pending operations to update to completion // Accumulate fitting results with the getnlr command getnlr iw:=__REPORT$ tr:=NewRes pn:=1; newbook name:="MyFits" s:=1; //Prepare a worksheet to store the fitted results range rres = [MyFits]1!; rres.nCols = 6; NextRow = rres.maxrows + 1; // Find next available row rres!cell(NextRow,1)$= NewRes.Data1.y1$; rres!cell(NextRow,2)= NewRes.p1; rres!cell(NextRow,3)= NewRes.p2; rres!cell(NextRow,4)= NewRes.p3; rres!cell(NextRow,5)= NewRes.p4;
Keywords:curve fitting