Home > chronux > locfit > m > lfmarg.m

lfmarg

PURPOSE ^

computes grid margins from a locfit object, used for plotting.

SYNOPSIS ^

function xfit = lfmarg(fit)

DESCRIPTION ^

 computes grid margins from a locfit object, used for plotting.
 this function is called from lfplot and lfband, will not normally
 be called directly by users.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function xfit = lfmarg(fit)
0002 
0003 % computes grid margins from a locfit object, used for plotting.
0004 % this function is called from lfplot and lfband, will not normally
0005 % be called directly by users.
0006 
0007 box = fit.fit_points.fit_limits;
0008 d = size(box,1);
0009 xfit = cell(1,d);
0010 mg = 10*ones(1,d);
0011 if (d==1) mg = 200; end;
0012 if (d==2) mg = [51 50]; end;
0013 for i=1:d
0014     xfit{i} = box(i,1) + (box(i,2)-box(i,1))*(0:mg(i))'/mg(i);
0015 end;
0016 
0017 return;

Generated on Fri 28-Sep-2012 12:34:30 by m2html © 2005