[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] matrix multiply question

From: Martell, Larry
Subject: [Help-gsl] matrix multiply question
Date: Mon, 7 Feb 2005 10:52:55 -0700

Hi all-
I am looking at the matrix multiple function (in oper_source.c)
and it doesn't seem to work like I expect it to. AFAIK, to multiply
two matrices you need to take a sum of products, e.g. if you
had an n x m matrix a, and you wanted to multiply it by a m x p
matrix, b, the product matrix, c, would have size n x p, and
the elements of c would be calculated as:
         c(n,p) = a(n,1) * b(1,p) + a(n,2) * b(2,p) + ... + a(n,m) * b(m,p)
But the function in oper_source.c looks like it just
does a straight element by element multiply, e.g.:
         c(n,p) = a(n,p) * b(n,p)
Am I remembering my matrix math wrong? Or am I misunderstanding
how that function works? Or am I looking at the wrong function for
what I want to do? Is there a function that does what I want?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]