Home > freetb4matlab > data-smoothing > regdatasmooth.m



%@deftypefn {Function File} {[@var{yhat}, @var{lambda}] =} regdatasmooth (@var{x}, @var{y}, [@var{options}])


function [yhat, lambda] = regdatasmooth (x, y, varargin)


% -*- texinfo -*-
%@deftypefn {Function File} {[@var{yhat}, @var{lambda}] =} regdatasmooth (@var{x}, @var{y}, [@var{options}])
% Smooths the @var{y} vs. @var{x} values of 1D data by Tikhonov
% regularization. The smooth y-values are returned as @var{yhat}. The
% regularization parameter @var{lambda} that was used for the smoothing
% may also be returned.
% Note:  the options have changed~
% Currently supported input options are (multiple options are allowed):
%@table @code
%@item 'd', @var{value}
% the smoothing derivative to use (default = 2)
%@item 'lambda', @var{value}
% the regularization paramater to use
%@item 'stdev', @var{value}
% the standard deviation of the measurement of @var{y}; an optimal
% value for lambda will be determined by matching the provided
% @var{value} with the standard devation of @var{yhat}-@var{y};
% if the option 'relative' is also used, then a relative standard
% deviation is inferred
%@item 'gcv'
% use generalized cross-validation to determine the optimal value for
% lambda; if neither 'lambda' nor 'stdev' options are given, this
% option is implied
%@item 'lguess', @var{value}
% the initial value for lambda to use in the iterative minimization
% algorithm to find the optimal value (default = 1)
% @item 'xhat', @var{vector}
%  A vector of x-values to use for the smooth curve; must be
%  monotonically increasing and must at least span the data
% @item 'weights', @var{vector}
%  A vector of weighting values for fitting each point in the data.
% @item 'relative'
%  use relative differences for the goodnes of fit term.  Conflicts
%  with the 'weights' option.
%@item 'midpointrule'
% use the midpoint rule for the integration terms rather than a direct
% sum; this option conflicts with the option 'xhat'
%@end table
% Please run the demos for example error.
% References:  Anal. Chem. (2003) 75, 3631; AIChE J. (2006) 52, 325
% @seealso{rgdtsmcore}
% @end deftypefn


This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003