next up previous contents
Next: (vector w) = (matrix Up: Vector Algebra Previous: (vector w) = (vector   Contents

(vector v) = (matrix o) * (vector z)

 
/* sphmv - vector = matrix * vector */

void sphmv(w,o,z) double *w, o[][3], *z; {
double u0, u1, u2;
u0=z[0]; u1=z[1]; u2=z[2];
w[0]=o[0][0]*u0+o[0][1]*u1+o[0][2]*u2;
w[1]=o[1][0]*u0+o[1][1]*u1+o[1][2]*u2;
w[2]=o[2][0]*u0+o[2][1]*u1+o[2][2]*u2;
}



Pedro Hernandez 2004-05-13