Print

Print


At 4:44 pm -0400 26/8/03, Aleksandar Donev wrote:
>Glenn Carver wrote:
>
>>  My question is why do I have to declare locm as a rank 1 array?
>If you look you'll see LBOUND and UBOUND return arrays also.
>
>The argument for this is consistency--people do write code that works in
>multiple dimensions. Is x^T*A*x a scalar or a 1x1 matrix (x is a vector, A a
>matrix)? You can answer one way or the other, but I think the more consistent
>one is that it is a matrix. The DIM argument can be used to get a scalar
>result, i.e., MINLOC(A, DIM=1) will be scalar.

Ahh!  I had not appreciated that subtlety regarding the use of DIM (f95+ only).

Thanks.

    Glenn