the columns being the 2nd number in [2,3], or 3 in this case, with the rows on the first data item,2?
Thanks
// matrix-matrix multiplication
private double [,] MMulti( double [,]A,double [,]B)
{
//Multiply two matrices together. They can be of any dimensions, so long as the number of columns of the first matrix is equal to the number of rows of the second matrix.
//if(a[0].length != b.length) return null; //invalid dims
int n=2;//no of columns A
int m=1;//no of rows A
int p=2;// number of colums B
double [,]C = new double[m,p];
for (int i = 0; i < m; ++i)
{
for (int j = 0; j < p; ++j)
{
C[i, j] = 0;
for (int k = 0; k < n; ++k)
{
C[i, j] += A[i, k] * B[k, j];
}
}
}
return C;
}

Comment