Matrix product using macro definition

Hi,

I have to code a matrix product using the macro-definition

Code:

`#define I2D(i, j, nc) ((i)*(nc)+(j))`

I have to use the scalar product in my matrix product function:

Code:

`double pScalC(double *v1, double *v2, int n, int d2)`

{

double sum = 0;

int i;

for (i = 0; i < n; i++) {

sum += v1[i] * v2[i];

}

return sum;

}

My matrix product function is:

Code:

`void pMatC(double *m1, double *m2, int l1, int c1, int c2, double *m3)`

I have to return m3 who is a matrix of l1*c2

I don't really know what to do...

Thanks