[ADMB Users] linear algebra (matrix algebra)

Saang-Yoon shyunuw at gmail.com
Wed Jun 16 18:23:06 PDT 2010


Dear ADMB folks.

I have a difficulty in coding matrix algebra with ADMB.  Regarding
lineary algebra, the ADMB syntax does not seem to be consistent with
the traditional linear algebra.  For example (as very simple example),
I have two matrices and one scalar as the follows:

matrix mA(1,2,1,1);
matrix mB(1,2,1,1);
number sC;

Traditionally, when the transpose of matrix mA is multiplied by matrix
mB, the resultant dimension becomes a scalar.  That is,

!!sC=trans(mA)*mB;

But, ADMB compilation says this is in error.  I wonder about how ADMB
users do when they do a linear algebra.  A friend of mine suggests a
looping, and I laugh the idea.  Yes, the looping for individual
products between  mA and mB elements would work.  However, I suspect
there is a more or less formal way.  Please help.

Thank you,

Saang-Yoon



More information about the Users mailing list