Mercurial > repos > vipints > rdiff
view rDiff/src/locfit/m/lfsmooth.m @ 1:08d3a6143873
Deleted selected files
author | vipints |
---|---|
date | Tue, 08 Oct 2013 06:54:25 -0400 |
parents | 0f80a5141704 |
children |
line wrap: on
line source
function yhat=lfsmooth(varargin) % % a simple interface to locfit. % output is a vector of smoothed values, at each data point. % all locfit options, except evaluation structures, are valid. % % Example, to smooth a time series of observations, % % t = (1:100)'; % y = 2*sin(t/10) + normrnd(0,1,100,1); % plot(t,y,'.'); % hold on; % plot(t,lfsmooth(t,y,'nn',0.5)); % hold off; % % Minimal input validation if nargin < 1 error( 'At least one input argument required' ); end fit = locfit(x,varargin{:},'module','simple'); yhat = fit.fit_points.fitted_values; return;