Fix test of min & max function. 89/8489/3
Adeline CARNIS [Thu, 2 Aug 2012 11:54:25 +0000 (13:54 +0200)]
Change-Id: I41bf33ba1923a77b7f7b47517074f547d813d8e2

scilab/modules/overloading/macros/%hm_maxi.sci
scilab/modules/overloading/macros/%hm_mini.sci

index 63776db..27e1c1a 100644 (file)
@@ -10,8 +10,8 @@
 \r
 function [x,k] = %hm_maxi(varargin)\r
     n=size(varargin)\r
-    m = varargin(1).dims\r
     if n==1 then\r
+        m = varargin(1).dims\r
         [x,k] = max(varargin(1).entries)\r
         if (argn(1) > 1 & (m(length(m)) <> size(varargin(1), "*"))) then\r
             k = ind2sub(m, k(1))\r
@@ -88,4 +88,8 @@ endfunction
 \r
 \r
 \r
+\r
+\r
+\r
+\r
 \r\r
index b367992..3866926 100644 (file)
@@ -9,8 +9,8 @@
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt\r
 function [x,k] = %hm_mini(varargin)\r
     n=size(varargin)\r
-    m = varargin(1).dims\r
     if n==1 then\r
+        m = varargin(1).dims\r
         [x,k] = min(varargin(1).entries)\r
         if (argn(1) > 1 & (m(length(m)) <> size(varargin(1), "*"))) then\r
             k = ind2sub(m, k(1))\r