Polyfit
[coef, RSquared]=plotfit(x,y,polyorder)A simple function that accepts x,y data pairs in in the vectors "x" and "y", fits it to a polynomial of order "polyorder", plots the data and the fit, and displays the fit coefficients and the goodness-of-fit measure R-squared in the upper left corner of the...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (45): plotfit Download |
pbest=EASYFIT(x,y,varargin) fits the data Y = f(X) to a model function Y = FUN(P,X).If FUN is not given as an input argument, POLYFIT is used as the model function.Bounds on the parameters P may be set.By default a plot is generated which presents the data as well the "best" curve, confidence...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (49): Fit experimental data is easy Download |
Like polyfit.m but includes weighting of each data point.Summary----------------Find a least-squares fit of 1D data y(x) with an nth order polynomial, weighted by w(x).Usage-----P = polyfitweighted(X,Y,N,W) finds the coefficients of a polynomial P(X) of degree N that fits the data Y best in a...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (41): polyfitweighted Download |
POLYFIT can fit a polynomial of given ORDer to vectorial data, using as independent variable data index, rescaled between -1 and 1. Similarly, BIPFIT fits a bipolynomial of given orders (a matrix) to matrix data.POLYVAL can calculate the VALues of a POLYnomial on an equidistant abscissa x, scaled...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): BIPVAL Download |
On the gaussian fit i used "polyfit" which gives you en absolut one solution, but have some problems fitting non-linear model.In the attached file example i use "nlinfit", which can fit any kind of function that you want. the problem is that you need to give here a starting point."main.m" include...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (47): lorentzian fit Download |
PDL::Slatec is a PDL interface to the slatec numerical programming library. SYNOPSIS use PDL::Slatec; ($ndeg, $r, $ierr, $a) = polyfit($x, $y, $w, $maxdeg, $eps); This module serves the dual purpose of providing an interface to parts of the slatec library and showing how to interface PDL...
Platforms: *nix
License: Freeware | Size: 2.1 MB | Download (115): PDL::Slatec Download |
easyfitGUI(varargin) fits real data Y = f(X) easyfitGUI open a figure with uimenus devoted to process the data. VARARGIN: one or several matrix [X, Y] having: first column = vector of the independant variable (X) second column = vector of the dependant variable (Y). The Y-data are plotted...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (43): easyfitGUI Download |
The stats toolbox is required for the 'linear' and 'quadratic' options only.function out=addFitLine(poolFits,modelType,lineprops,ax) Purpose Add one or more fit lines to some or all data in axes "ax" or, without ax specified, to the current axes. Inputs *poolFits [optional 0 by default] - if 1 we...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (40): addFitLine Download |
POLYFIT_ROOTS Least-squares polynomial fit to data.[R,K] = POLYFIT_ROOTS(X, Y, N, TOL) finds the roots R and constant K so that the polynomial P(s) = K*(s-R(1))*(s-R(2))* ... *(s-R(N)) is the best least-squares fit to the data Y at points X.Argument TOL bounds the accuracy of the fit, and if...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 81.92 KB | Download (47): polyfit_roots Download |
USAGE: noise=fftnoise(f[,Nseries]) INPUTS: f: the fft of a time series (must be a column vector) Nseries: number of noise series to generate. (default=1) OUTPUT: noise: surrogate series with same power spectrum as f. (each column is a surrogate). ------ Example: ------ %calculate if the trend is...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (41): fftnoise - generate noise with a specified power spectrum Download |
POLYFIT3(X,Y,N,NUL,W) finds the coefficients of a polynomial P(X) of degree N that fits the data, P(X(I))~=Y(I), in a least-squares sense. Any of the coefficients can be forced to be zero, and data can be weighted.NUL is a vector with coefficients forced to be zero in usual order.W is a vector...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (47): polyfit3 Download |
Plot data in a figure, and then interactively choose regression area. The result from polyfit is returned.Example:x=1:1:10;y=sin(x);f=figure; plot( x,y );[p,h] = figreg( f, 2 );%fit a second order polynom to selected region in plot
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): Interactive regression on a plot Download |
r2 = rsquare(y,f) RSQUARE computes the coefficient of determination (R-square) value from actual data Y and model data F. INPUTS Y : Actual data F : Model fit OUTPUT R2 : Coefficient of determination EXAMPLE x = 0:0.1:10; y = 2.*x + 1 + randn(size(x)); p = polyfit(x,y,1); f = polyval(p,x); r2...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (47): R-square: The coefficient of determination Download |
% function ynew=adsmoothdiff(dados,xnew,sdx,isdx,q,nmin)% written by Carlos J Dias%% ADAPTIVE DEGREE SAVISTZKY-GOLAY SMOOTHING AND DIFFERENTIATION% This function smooths and differentiates a sequence of numbers based on% an algorithm drawn on the ideas of Savistky and Golay and Barak.% There are...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (40): ADAPTIVE DEGREE SMOOTHING AND DIFFERENTIATION (Scipts) Download |
Removes nonlinear trend from dataDETRENDNONLIN Removes non-linear trend from a vector.The nonlinearity is removed by subtracting a least-squarespolynomial fit.Y = DETRENDNONLIN(X) subtracts a second order polynomial fit fromthe data vector X.Y = DETRENDNONLIN(X, n) subtracts a polynomial fit of...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (42): Detrend Non-linear Data Download |
polyfitweighted2.m and polyval2.m---------polyfitweighted2.m: Find a least-squares fit of 2D data z(x,y) with an n th order polynomial, weighted by w(x,y).polyval2.m: Evaluate 2D polynomial produced by polyfitweighted2.m.Usage polyfitweighted2-----P = polyfitweighted2(X,Y,Z,N,W) finds the...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 20.48 KB | Download (43): 2D Weighted Polynomial Fitting and Evaluation Download |