Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /inst/rgdtsmcorewrap.m [c16b8e] .. [7c0f29] Maximize Restore

  Switch to side-by-side view

--- a/inst/rgdtsmcorewrap.m
+++ b/inst/rgdtsmcorewrap.m
@@ -24,12 +24,15 @@
 ## @seealso{regdatasmooth}
 ## @end deftypefn
 
+function out = rgdtsmcorewrap (log10lambda, x, y, d, mincell, varargin)
 
-function out = rgdtsmcorewrap (log10lambda, x, y, d, mincell, varargin)
+  if (nargin < 5)
+    print_usage;
+  endif
 
   lambda = 10^(log10lambda);
 
-   if ( length(mincell) == 2 ) # using stdev to find optimal lambda
+  if ( length(mincell) == 2 ) # using stdev to find optimal lambda
     stdev = mincell{2};
     yhat  = rgdtsmcore (x, y, d, lambda, varargin{:});
 
@@ -58,7 +61,7 @@
         stdevd = std(y-yhat);
       endif
     endif
-    
+
     out = (stdevd - stdev)^2;
 
   else # use gcv to find optimal lambda