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

 Akzeptierte Antwort

Image Analyst
Image Analyst am 22 Sep. 2017

0 Stimmen

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.

Weitere Antworten (1)

Kategorien

Mehr zu Interpolation finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by