Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Why i get : Matrix dimensions must agree? What is meant by this error?

1 Ansicht (letzte 30 Tage)
sam  CP
sam CP am 4 Apr. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Why i get the following error
Error using .* Matrix dimensions must agree.
Error in Untitled2 (line 41)
ccc1=sum(sum(u1.*u1.*IM))/sum(sum(u1.*u1));
  1 Kommentar
Stephen23
Stephen23 am 4 Apr. 2017
Bearbeitet: Stephen23 am 4 Apr. 2017
When I search this forum for "dimensions do not agree" I get 966 results:
Did you look at any of them? This is a very common error that has been explained a thousand times before, and finding information on it is very easy: the top-right of this page has a big white field labeled "Search Answers". It is free for you to use.

Antworten (1)

KSSV
KSSV am 4 Apr. 2017
You see in line number 41, the matrices which you are multiplying are not of same dimensions. You have to get them to similar dimension using imresize. Check the attached file, whether it gives expected result.
  1 Kommentar
sam  CP
sam CP am 4 Apr. 2017
I got a blank image when i try this code. I can see that the input image and output image are shown blank by applying this code.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by