Mercurial > repos > vipints > rdiff
annotate rDiff/src/locfit/m/smooth_lf.m @ 1:08d3a6143873
Deleted selected files
author | vipints |
---|---|
date | Tue, 08 Oct 2013 06:54:25 -0400 |
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; |