I don't know if I hit the correct site but would be grateful for an answer -
it is a fundamental one. We all know that linear regression can be
accomplished by matrix multiplication and that there are packages which will
do it for you. I am teaching myself C++ and for the purposes of the
excercise I would like to know how to create a matrix or obtain ready made
code (ie "numerical recipe" )class so I could declare in a program:

#include <iostream.h>
#include <math.h>
#include <matrix.h>      /* if there is such a file */

matrix<3,3> a, b, c, d,e;
/* steps to load the matrix with numbers*/
....................................
....................................
c = a*b;
d = pow(c,-1);    /*inverse a matrix (I know it's not the same approach as
2^2) */
e= trans(d,-1);
cout << d << e << endl; /*overloading the operator to permit output
                                         or to permit

/* and so on. */

Given that the C++ compiler has a vector.h file to do vectors, I wonder if
there is something in the line of a matrix. It's really neat to express
something so abstract and profound as one line. It's like Euler's theorem.

Thank You,

Anthony Pleticos

mailto:[EMAIL PROTECTED]





===========================================================================
This list is open to everyone.  Occasionally, less thoughtful
people send inappropriate messages.  Please DO NOT COMPLAIN TO
THE POSTMASTER about these messages because the postmaster has no
way of controlling them, and excessive complaints will result in
termination of the list.

For information about this list, including information about the
problem of inappropriate messages and information about how to
unsubscribe, please see the web page at
http://jse.stat.ncsu.edu/
===========================================================================

Reply via email to