Skip to main content
GameDev.net gamedev.net
🔒 Locked

Matrix multiplication

Started by ripz Mar 5, 2004 at 9:55 AM 0 replies 750+ views
Original Post
ripz
ripz
Hullo, I have calculated the inverse of a matrix using nag fortran routines. I have also asked the user to input a 2x1 matrix. What i''m having trouble with is to multiply these 2 matrices. The inverse matrix is a 2x2 matrix but it could be any dimensional. The code of what i''ve done so far is: /*LU Factorisation */ f07adf_(&n, &n, (double *)jac,&lda, ipiv, &info); /*calculating inverse*/ f07ajf_(&n,(double *)jac,&lda, ipiv, work,&lwork, &info); /*Printing out the Inverse matrix*/ printf("Inverse Matrix: \n"); for(i=0;i[j]); } printf("\n"); } /*Input the Functional Equations evaluated at X0,y0*/ printf("Please enter the values of the Functional Equations evaluated at X0, Y0.\n"); printf("These were calculated in the beginning of this system.\n"); for(i=0;i
Cedric
Cedric
Use the [ source] tags to prevent your code from being jubalyed.
quote:
Original post by ripz
So what I am having difficulty with is to multiply the jac[j] matrix with f[i].
Do you have tentative code to do that? If you know how to do matrix multiplication on paper, the code shouldn''t be very hard to build.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.