#include "Matrix.h" struct matrix SubtractMatrices(struct matrix A, struct matrix B){ int i,j; struct matrix C = {0,0,NULL}; /* Checking Dimensions */ if(A.m!=B.m && A.n!=B.n){ printf("SubtractMatrices.c Non-conforming Matrices: \n \ Can not form A-B because A is %ix%i and B is %ix%i.", A.m, A.n, B.m, B.n); return C; }; /* prints header */ C=InitializeMatrix(A.m,A.n); /* prints values */ for(i=0;i<(C.m);i++){ for(j=0;j<(C.n);j++){ C.mat[i][j]=A.mat[i][j] - B.mat[i][j]; }; }; return C; };