Mercurial > hg > ltpda
view m-toolbox/html_help/help/ug/sigproc_polyfit_content.html @ 47:dd93c9ba6624 database-connection-manager
Fix Java dialog
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 19:07:27 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
<p> <a href="matlab:doc('ao/polyfit')">polyfit.m</a> overloads the polyfit() function of MATLAB for Analysis Objects.<br/> The script calls the following MATLAB functions: <ul> <li> polyfit.m </li> <li> polyval.m </li> </ul> <h2><a name="usage">Usage</a></h2> <div class="fragment"><pre> <span class="comment">% CALL: b = polyfit(a, pl)</span> <span class="comment">%</span> <span class="comment">% Parameters: 'N' - degree of polynomial to fit</span> <span class="comment">% 'coeffs' - (optional) coefficients</span> <span class="comment">% formed e.g. by [p,s] = polyfit(x,y,N);</span> </pre></div> 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/> Using the output of polyval.m the fitted data series is created and outputted as analysis object. </p>