Mercurial > repos > vipints > rdiff
annotate rDiff/src/locfit/m/smooth_lf.m @ 3:29a698dc5c7e default tip
Merge multiple heads.
| author | Dave Bouvier <dave@bx.psu.edu> | 
|---|---|
| date | Mon, 27 Jan 2014 14:15:36 -0500 | 
| parents | 0f80a5141704 | 
| children | 
| rev | line source | 
|---|---|
| 0 | 1 function z=smooth_lf(x,y,varargin) | 
| 2 | |
| 3 % must (unlike R smooth.lf() function) give x and y. | |
| 4 % also R's direct=T is automatic. | |
| 5 % | |
| 6 | |
| 7 xev = x; | |
| 8 if (k>1) | |
| 9 if (strcmp(varargin{1},'xev')) | |
| 10 xev = varargin{2}; | |
| 11 varargin(1:2) = []; | |
| 12 end; | |
| 13 end; | |
| 14 fit = locfit(x,y,varargin{:},'ev',xev,'module','simple'); | |
| 15 z = lfknots(fit); | |
| 16 fv = invlink(z(:,1),fit.fit_points.family_link); | |
| 17 | |
| 18 z = { xev, fv }; | |
| 19 | |
| 20 return; | 
