matrixMultiply
Jeanne A. E. DeVoto
jeanne at runrev.com
Sat Sep 21 18:51:01 EDT 2002
At 4:23 PM -0700 9/21/2002, Brad Allen wrote:
>Another question about matrixMultiply in Rev: According to the entry
>in the Transcript dictionary for the operator "*", we should be able
>to multiply matrices by using the * operator instead of the
>matrixMultiply() function. I'm trying it with a 4 x 4 array, so it
>should work, but using the * operator yields different results from
>matrix multiply.
Yes, that's correct. The matrixMultiply function performs a matrix
multiplication; the * operator, if the two operands are matrixes, simply
multiplies each element of one array by the correponding element in the
second array.
"If an array is multiplied by an array, both arrays must have the same
number of elements and the same dimension, and each element in one array is
multiplied by the corresponding element of the other array."
--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/
More information about the Use-livecode
mailing list