#define MAX_MATRIX2_DATA 10 typedef struct { double *a; int i; int j; } Matrix; typedef struct { double *a[MAX_MATRIX2_DATA]; int i; int j; } Matrix2; extern void ProdM( Matrix *M1, Matrix *M2 , Matrix *M); extern void ProdM2( Matrix *M1, Matrix2 *M2 , Matrix *M); extern void print_matrix( Matrix *M); extern void print_matrix2( Matrix2 *M); #define el(ii,jj,m) (*( (m)->a + (jj)*((m)->i) + (ii) )) #define el2(ii,jj,m) (*( (m)->a[jj] + (ii) )) #define new_matrix(x,y,m) m.i=x; m.j=y; \ m.a = (double*)calloc((size_t)(m.i*m.j),sizeof(double)) #define dispose_matrix(m) if(m.a!=NULL) free(m.a)