Mercurial > repos > vipints > rdiff
annotate rDiff/src/locfit/m/lfmarg.m @ 0:0f80a5141704
version 0.3 uploaded
author | vipints |
---|---|
date | Thu, 14 Feb 2013 23:38:36 -0500 |
parents | |
children |
rev | line source |
---|---|
0 | 1 function xfit = lfmarg(fit) |
2 | |
3 % computes grid margins from a locfit object, used for plotting. | |
4 % this function is called from lfplot and lfband, will not normally | |
5 % be called directly by users. | |
6 | |
7 box = fit.fit_points.fit_limits; | |
8 d = size(box,1); | |
9 xfit = cell(1,d); | |
10 mg = 10*ones(1,d); | |
11 if (d==1) mg = 200; end; | |
12 if (d==2) mg = [51 50]; end; | |
13 for i=1:d | |
14 xfit{i} = box(i,1) + (box(i,2)-box(i,1))*(0:mg(i))'/mg(i); | |
15 end; | |
16 | |
17 return; |