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
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
!!sC=(trans(mA)*mB)(1,1);
should do the trick for you.