Confused
Confused

Reputation: 1

Matlab matrix Multiplication error

When I am using the following line of code in Matlab for the multiplication of two matrices

multiplied = singleMat * singleMatT;

Then it gives me this error..

??? Error using ==> mtimes Integer data types are not fully supported for this operation. At least one operand must be a scalar.

Please help me out for the multiplication of two matrices in matlab..

Upvotes: 0

Views: 459

Answers (1)

Mathias
Mathias

Reputation: 1500

I guess Matlab doesn't support matrix multiplication of integer matrixes. Try:

multiplied = double(singleMat) * double(singleMatT);

or

multiplied = single(singleMat) * single(singleMatT);

if single precision is enough.

Upvotes: 1

Related Questions