* Bug #13527 fixed - hilb did not check correctly the type of first input argument.
[scilab.git] / scilab / modules / signal_processing / macros / hilb.sci
index ab121ce..c4f1dc8 100644 (file)
@@ -38,6 +38,9 @@ function xh=hilb(n,wtype,par)
     if type(n)<>1|size(n,"*")<>1 then
         error(msprintf(gettext("%s: Wrong size for input argument #%d: A scalar expected.\n"),"hilb",1));
     end
+    if (n - floor(n) <> 0) | (floor(n/2) == n/2) then
+        error(msprintf(gettext("%s: Wrong type for input argument #%d: An odd integer expected.\n"),"hilb",1));
+    end
     if and(wtype<>["re","tr","hn","hm","kr","ch"]) then
         error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n") ,"hilb",2,"''re'',''tr'',''hn'',''hm'',''kr'',''ch''"));