Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
sam  CP
sam CP 2017년 4월 4일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Stephen23
Stephen23 2017년 4월 4일
편집: Stephen23 2017년 4월 4일
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.

답변 (1개)

KSSV
KSSV 2017년 4월 4일
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
sam  CP
sam CP 2017년 4월 4일
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.

Community Treasure Hunt

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

Start Hunting!

Translated by