Is this a homework assignment?
MultMatrix(firstM, secondM, outM, firstrows, cols, secondcols)
Matrix firstM, secondM, outM;
int firstrows, cols, secondcols;
{
int i,j,k;
double sum;
for(i=0; i %26lt; secondcols; i++)
for(j=0; j %26lt; firstrows; j++)
{
sum = 0.0;
for(k=0; k %26lt; cols; k++)
sum += firstM[j][k] * secondM[k][i];
outM[j][i] = sum;
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment