How can I solve this Error message:'Interges can only be combined with ....'?

10 vues (au cours des 30 derniers jours)
Soyoung
Soyoung le 18 Mar 2011
I got error message like '' ??? Error using ==> mtimes Integers can only be combined with integers of the same class, or scalar doubles. ''
I use rotation transformation in 3D matrix. In previou, code worked well but it is suddenly interfered at rotational matrix. I checked input values but all the values are floating typed and integers. Is anyone possible to understand and have solution on the error? Thank you.

Réponse acceptée

Walter Roberson
Walter Roberson le 18 Mar 2011
Locate the integer variable and put double() around the reference to it.

Plus de réponses (1)

Soyoung
Soyoung le 18 Mar 2011
Could you explain your comment with example? I am sorry for that I can not understand well the meaning. Sorry. And thank you very much for your quick answer. Also, I found your comment for my last question. It is appreciated too.
  1 commentaire
Walter Roberson
Walter Roberson le 18 Mar 2011
example:
B = I .* A;
would get changed to
B = double(I) .* A;

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by