Diff of /inst/reedmullerdec.m [67ecc4] .. [f62e8c] Maximize Restore

  Switch to side-by-side view

--- a/inst/reedmullerdec.m
+++ b/inst/reedmullerdec.m
@@ -52,7 +52,7 @@
 
 function [C, CMM] = reedmullerdec (VV, G, R, M)
 
-  if (nargin < 4)
+  if (nargin != 4)
     print_usage ();
   endif
 
@@ -257,4 +257,10 @@
 % c1=1*G;
 % c2=0*G; C=[c1; c2]
 % [dC,dM]=reedmullerdec(C,G,0,3)
-%
+
+%% Test input validation
+%!error reedmullerdec ()
+%!error reedmullerdec (1)
+%!error reedmullerdec (1, 2)
+%!error reedmullerdec (1, 2, 3)
+%!error reedmullerdec (1, 2, 3, 4, 5)