X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Felementary_functions%2Fmacros%2Fnchoosek.sci;h=4028701c76bd5e847a71750b3979b04b022f752b;hp=7cc6db05209cfd531b4a3fa2428a2500c76081cc;hb=54b2cafb50148f79762f7b956054c051e04d39b4;hpb=f8cef93c02efce871e2f24513ff61e46af7b7e70 diff --git a/scilab/modules/elementary_functions/macros/nchoosek.sci b/scilab/modules/elementary_functions/macros/nchoosek.sci index 7cc6db0..4028701 100644 --- a/scilab/modules/elementary_functions/macros/nchoosek.sci +++ b/scilab/modules/elementary_functions/macros/nchoosek.sci @@ -115,7 +115,7 @@ function varargout = nchoosek(n, k, logFormat) if lhs==2 | isdef("logFormat","l") then varargout(1) = logb end - if lhs==1 & ~isdef("logFormat","l") | lhs==2 then + if lhs<=1 & ~isdef("logFormat","l") | lhs==2 then varargout($+1) = b end endfunction