how can i solve this error: "index exceeds matrix dimensions"

조회 수: 2 (최근 30일)
Hira Abid
Hira Abid 2018년 7월 1일
댓글: dpb 2018년 7월 1일
i am trying the code from file exchange but getting is error: Index exceeds matrix dimensions. Error in Zernikmoment
Product = p(x,y).*Rad.*exp(-1i*m*Theta);
Error in Zernikmain
[mom, amplitude, angle] = Zernikmoment(BW2,4,0);
help me solving this error
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 7월 1일
They included a link to the FEX code.
dpb
dpb 2018년 7월 1일
Ah...it had scrolled off the screen...

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 7월 1일
The submission includes Zernik_main but not Zernikmain (the file name in your message), and the Zernik_main does not include that line. We can conclude that your Zernikmain is not the same as the code they posted with a similar file name.
Zernikmoment assumes that it is being passed a square 2D matrix, p, and your code is violating that assumption so it is getting an index out of range.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Zernike Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by