From: Samuel GOUGEON Date: Mon, 14 Dec 2020 17:22:27 +0000 (+0100) Subject: nchoosek(4,2) displayed nothing X-Git-Tag: 6.1.1~117 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=54b2cafb50148f79762f7b956054c051e04d39b4 nchoosek(4,2) displayed nothing Change-Id: I83f55c7a34cd871dd3737502395130c8f28d9787 --- 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