Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /inst/ddmat.m [ed273d] .. [6020fc] Maximize Restore

  Switch to side-by-side view

--- a/inst/ddmat.m
+++ b/inst/ddmat.m
@@ -33,10 +33,13 @@
 ## @end deftypefn
 
 ## corrected the recursion multiplier; JJS 2/25/08
-
+## added error check that x is a column vector; JJS 4/13/09
 
 
 function D = ddmat(x, d)
+  if ( size(x)(2) != 1 )
+    error("x should be a column vector")
+  endif
   m = length(x);
   if d == 0
     D = speye(m);