raizul khan
raizul khan

Reputation: 1

jblas 2-d matrix multiplication

I want to compute 2d matrix-matrix multiplication using the Jblas library. But I failed every time to compute. Please help me to do this by giving an example with data.

Upvotes: 0

Views: 50

Answers (1)

PebNischl
PebNischl

Reputation: 189

That should be fairly straightforward, just make sure that your matrices have the right size:

DoubleMatrix matA = new DoubleMatrix(2, 2, 1, 2, 3, 4);
DoubleMatrix matB = new DoubleMatrix(2, 2, 5, 6, 7, 8);

DoubleMatrix res = matA.mmul(matB);

Upvotes: 0

Related Questions