|
Contents | Previous | Next | Subchapters |
| Syntax |
linlsqdlg |
| See Also | polfitdlg matrix division |
x,
and another column for the dependent variable, y.
In addition, the user will define
an expression for each of the fitting functions.
a:
n 5 2
--- [ --- ]
> [ y - > a * f (x ) ]
--- [ i --- j j i ]
i=1 j=1
where n is the number of rows in the data file.
The resulting new value for the vector a is displayed in the dialog.
x.
(Thus the fitting function evaluates to a column vector with the same
length as x.)
For example, the expression
sin(x)
defines the element-by-element sine function of the column vector
argument x.
There is one exception to this rule:
if the character x is not present in the fitting function definition,
it is assumed to evaluate to a
scalar
(for example if the fitting function definition is 1.)
In this case,
it represents a constant and is the same value independent of the value of
x.
a either directly
in the dialog or by choosing the Fit button.)
The lower plot contains the residuals plotted as circles.
The upper plot contains the data and fitted function values.
The data is plotted as circles and the fitted function is plotted
as a curve.
linlsqdlg.
temp.dat contains
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
and you enter
clear
linlsqdlg
O-Matrix will display the following dialog
If you then use the File button to select the file temp.dat,
O-Matrix will display the name of the file in the dialog.
If you then choose the following setting
| x column index | 1 |
| y column index | 2 |
| f1(x) | 1 |
| f2(x) | x |
| f3(x) | x^2 |
| f4(x) | |
| f5(x) |