nchoosek(4,2) displayed nothing 48/21648/2
Samuel GOUGEON [Mon, 14 Dec 2020 17:22:27 +0000 (18:22 +0100)]
Change-Id: I83f55c7a34cd871dd3737502395130c8f28d9787

scilab/modules/elementary_functions/macros/nchoosek.sci

index 7cc6db0..4028701 100644 (file)
@@ -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