<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 17/01/2020 Ã 06:28, Federico Miyara
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:fe4ce177-0f90-449e-77b7-983ffac0efd1@fceia.unr.edu.ar">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<br>
<font face="Courier New">Dear all,<br>
<br>
I've seen that functions like max, min, sum, prod, cumsum,
cumprod, mean, median, stdev are similar in that they act on
several data returning a scalar result. If "r" or "c" are
included</font><font face="Courier New"> as an additional
argument, they operate along rows or columns. <br>
<br>
E</font><font face="Courier New">xcept for max and min, they all
accept 1 and 2 instead of "r" and "c". By the way, in several
help pages this possibility is presented as a side note. <br>
<br>
I understand this slight difference is to allow the comparison
of a whole array with a scalar, so that max(x,1), for instance,
is an array whose components are the maximum between the
original components and 1.<br>
<br>
This prevents using the general syntax max(x,1) which would be
more consistent, allowing its genaralization as max(x,n) where n
is the dimension along which the requested operation would be
performed. </font><font face="Courier New"><br>
<br>
Currently n may be only 1 and 2, but there is no reason why it
couldn't be any other dimension. </font><font face="Courier
New">For instance, calling the third dimension</font><font
face="Courier New"> "layer"</font><font face="Courier New">,
max(x,3) would mean getting the maximum of a row and column
along different layers. This could be used, for instance, to get
the most brilliant version of a pixel along successive frames in
a movie.<br>
<br>
</font><font face="Courier New">To keep the
comparison-with-a-scalar feature, it would be enough to place
the scalar first: max(1,x). The only caution needed in this kind
of comparisons is that if there is at least one non-scalar array
in the comparison list, the last item should be non-scalar.<br>
</font></blockquote>
<p><br>
</p>
<p>This issue is reported at <a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/14639">http://bugzilla.scilab.org/14639</a>.<br>
It is proposed to exceptionnaly specify the dim as a literal
number, as in</p>
<p><font face="Courier New">max(A,"3")</font></p>
<p>Regards</p>
<p>Samuel<br>
<br>
</p>
</body>
</html>