Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/sigproc_polyfit_content.html @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 <p> | |
2 <a href="matlab:doc('ao/polyfit')">polyfit.m</a> overloads the polyfit() function of MATLAB for Analysis Objects.<br/> | |
3 The script calls the following MATLAB functions: | |
4 <ul> | |
5 <li> polyfit.m </li> | |
6 <li> polyval.m </li> | |
7 </ul> | |
8 <h2><a name="usage">Usage</a></h2> | |
9 <div class="fragment"><pre> | |
10 <span class="comment">% CALL: b = polyfit(a, pl)</span> | |
11 <span class="comment">%</span> | |
12 <span class="comment">% Parameters: 'N' - degree of polynomial to fit</span> | |
13 <span class="comment">% 'coeffs' - (optional) coefficients</span> | |
14 <span class="comment">% formed e.g. by [p,s] = polyfit(x,y,N);</span> | |
15 </pre></div> | |
16 The MATLAB function polyfit.m finds the coefficients of the polynomial p(x) of degree N that fits the vector 'x' to the vector 'y', in a least squares sense.<br/> After this in the script <a href="matlab:doc('ao/polyfit')">polyfit.m</a> the function polyval.m is called, which evaluates the polynomial of order 'N' according to these coefficients. <br/> | |
17 Using the output of polyval.m the fitted data series is created and outputted as analysis object. | |
18 </p> | |
19 |