When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
7 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Multiplying matrices from onedimensional arrays
I just skimmed your code but this one really stands out immediately:
double arr_matA[rowf1][colf1];
double arr_matB[rowf2][colf2];
double arr_matC[rowf2][colf2];
So I figured that A and B are the matrices you want to multiply and C is the result matrix. However here A is a n x m matrix and B is a k x l matrix, with the result also being a k x l matrix.
This is not how matrix multiplication is defined.
When multiplying two matrices A and B, A must be a n x m matrix, B needs to be a m x k matrix and the result C has to be a n x k one.
Make sure you #include <stdlib.h> for the malloc() function
Thank you and let us know if you have any more questions!