inner matrix dimensions must agree

??? Error using ==> mtimes Inner matrix dimensions must agree.
Error in ==> Untitled at 516 Fobj =HM*fobj ;
how can i solve this problem

 Respuesta aceptada

Image Analyst
Image Analyst el 22 de Sept. de 2017
For a matrix multiplication, if HM is r1 rows by c1 columns, and fobj is r2 rows and c2 columns, then c1 must equal r2. So essentially it's like r1-by-c1 * c1-by-r2. The inner dimensions are now both c1 and it will work.
On the other hand if you want element-by-element multiplication then r1 must equal r2 and c1 must equal c2. THEN you can do:
Fobj = HM .* fobj; % Use dot star instead of just star.

Más respuestas (1)

Categorías

Más información sobre Interpolation en Centro de ayuda y File Exchange.

Preguntada:

el 22 de Sept. de 2017

Respondida:

el 22 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by