/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/ /* matmult.c APL2 V1.0.0 *********************************************** * Called by mdivide. * * Given two matrices A and B, A having M rows and N columns, B having * * N rows and P columns, matmult will return a pointer to a new matrix * * C, having M rows and P columns. An element in C at the Ith row and * * Jth column is formed by the sum of a[i][k]*b[k][j], for k=1 to N. * ***********************************************************************/ #define INCLUDES APLMEM #include "includes.h" double *matmult(a,b,arows,acols,bcols) double *a,*b; int arows,acols,bcols; { int i,j,k; double t,*m,*n,*c; c=malloc(arows*bcols*sizeof(t)); for (i=0;i