annotate rDiff/src/locfit/m/lfmarg.m @ 1:08d3a6143873

Deleted selected files
author vipints
date Tue, 08 Oct 2013 06:54:25 -0400
parents 0f80a5141704
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 function xfit = lfmarg(fit)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3 % computes grid margins from a locfit object, used for plotting.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4 % this function is called from lfplot and lfband, will not normally
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5 % be called directly by users.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7 box = fit.fit_points.fit_limits;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8 d = size(box,1);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9 xfit = cell(1,d);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10 mg = 10*ones(1,d);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
11 if (d==1) mg = 200; end;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 if (d==2) mg = [51 50]; end;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13 for i=1:d
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14 xfit{i} = box(i,1) + (box(i,2)-box(i,1))*(0:mg(i))'/mg(i);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 end;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
16
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 return;