From octave-maintainers-request at bevo dot che dot wisc dot edu Wed Sep 6 15:06:11 2000 Subject: Re: [PATCH] Add min/max tests. (4/4) From: "John W. Eaton" To: Edward Jason Riedy Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Wed, 6 Sep 2000 14:58:32 -0500 (CDT) On 5-Sep-2000, I wrote | How about | | min (abs (x), abs (y)) | | ? as a suggestion for how to explicitly state that you want to find the numbers with the minimum magnitudes. After sending it, I realized that this is not really what you want, since it returns the minimum magnitudes, not the NUMBERS with the minimum magnitudes. So, I think what is really needed is some way to tell the min and max funtions what comparison operation (or function) to use. That would allow the programmer to clearly state his intention instead of relying on some convention that can cause trouble when there are mixed types or the potential for automatic data type conversions to occur. Also, if it were up to me (or if I could do it over again) I would want to avoid the problem that results from min, max, and other functions working on columns of a matrix except when the matrix happens to have only one row. jwe