<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<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>
<br>
Regards,<br>
<br>
Federico Miyara <br>
<br>
</font>
</body>
</html>