how can i solve this error: "index exceeds matrix dimensions"
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hira Abid
el 1 de Jul. de 2018
Comentada: dpb
el 1 de Jul. de 2018
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 comentarios
Respuesta aceptada
Walter Roberson
el 1 de Jul. de 2018
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Zernike Polynomials en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!