File: nonlin_005fcurvefit.html

package info (click to toggle)
octave-optim 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,064 kB
  • ctags: 374
  • sloc: cpp: 1,126; perl: 158; makefile: 79
file content (103 lines) | stat: -rw-r--r-- 5,199 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<html lang="en">
<head>
<title>nonlin_curvefit - optim_doc</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="optim_doc">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Residual-optimization.html#Residual-optimization" title="Residual optimization">
<link rel="prev" href="nonlin_005fresidmin.html#nonlin_005fresidmin" title="nonlin_residmin">
<link rel="next" href="lm_005fsvd_005ffeasible.html#lm_005fsvd_005ffeasible" title="lm_svd_feasible">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Additional documentation for the optim package for Octave.

Copyright (C) <Olaf Till <i7tiol@t-online.de>>

You can redistribute this documentation and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any
later version.

This documentation is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with this documentation; if not, see <http://www.gnu.org/licenses/>.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="nonlin_curvefit"></a>
<a name="nonlin_005fcurvefit"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="lm_005fsvd_005ffeasible.html#lm_005fsvd_005ffeasible">lm_svd_feasible</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="nonlin_005fresidmin.html#nonlin_005fresidmin">nonlin_residmin</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Residual-optimization.html#Residual-optimization">Residual optimization</a>
<hr>
</div>

<h3 class="section">2.2 Function nonlin_curvefit() for curve fitting</h3>

<p><a name="index-nonlin_005fcurvefit-33"></a>
In curve fitting, the model function computes values from a constant set
of `independents', and the intention is to minimize the differences of
these computed values to a constant set of `observations'. This can be
done with <code>nonlin_residmin</code>, but it is more convenient to use
<code>nonlin_curvefit</code>, which cares for passing the constant
`independents' to the model function and for calculating the differences
to the constant `observations'.

   <p>However, if in some optimization problem you notice that you end up with
passing dummy-values for the `independents' and zeros for the
`observations', you can more naturally use <code>nonlin_residmin</code>
instead of <code>nonlin_curvefit</code>.

<!-- include function help here -->
<!-- nonlin_curvefit ../inst/nonlin_curvefit.m -->
   <p><a name="XREFnonlin_005fcurvefit"></a>

<div class="defun">
&mdash; Function File: [<var>p</var>, <var>fy</var>, <var>cvg</var>, <var>outp</var>] = <b>nonlin_curvefit</b> (<var>f, pin, x, y</var>)<var><a name="index-nonlin_005fcurvefit-34"></a></var><br>
&mdash; Function File: [<var>p</var>, <var>fy</var>, <var>cvg</var>, <var>outp</var>] = <b>nonlin_curvefit</b> (<var>f, pin, x, y, settings</var>)<var><a name="index-nonlin_005fcurvefit-35"></a></var><br>
<blockquote><p>Frontend for nonlinear fitting of values, computed by a model
function, to observed values.

        <p>Please refer to the description of <code>nonlin_residmin</code>. The
differences to <code>nonlin_residmin</code> are the additional arguments
<var>x</var> (independent values, mostly, but not necessarily, an array of
the same dimensions or the same number of rows as <var>y</var>) and
<var>y</var> (array of observations), the returned value <var>fy</var> (final
guess for observed values) instead of <var>resid</var>, that the model
function has a second obligatory argument which will be set to
<var>x</var> and is supposed to return guesses for the observations (with
the same dimensions), and that the possibly user-supplied function
for the jacobian of the model function has also a second obligatory
argument which will be set to <var>x</var>.

     <!-- The following block will be cut out in the package info file. -->
     <p class="noindent"><strong>See also:</strong> <a href="XREFnonlin_005fresidmin.html#XREFnonlin_005fresidmin">nonlin_residmin</a>.

        </blockquote></div>

<!-- replace the cut out text -->
   <p>Also, if the setting <code>user_interaction</code> is given, additional
information is passed to these functions, see
 <a href="Common-optimization-options.html#Common-optimization-options">Common optimization options</a>.

<!--  -->
   </body></html>