inpolygon, different results from MATLAB R2022a and R2023a?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
aoi1_x = [0, 960];
aoi1_y = [0, 1080];
inpolygon(2, 2, aoi1_x, aoi1_y)
R2022a returns 1, but R2023a returns 0.
I would like to know why these results differ.
6 comentarios
Dyuman Joshi
el 12 de Dic. de 2023
I disagree. It's frustrating to know that a well known* bug is not even acknowleged by TMW, nor is there any acknowlegment of the bug being fixed for the later versions.
And the fact that it is still not fixed for the versions mentioned, just adds onto the frustration.
* - I say well known because it appears across multiple versions.
Adam Danz
el 12 de Dic. de 2023
Editada: Adam Danz
el 12 de Dic. de 2023
To confirm what others have mentioned above, this behavior was updated in R2022b.
A bug report was not published.
For FAQs on bug reports, see https://www.mathworks.com/support/bug_reports/faq.html
Respuestas (1)
Cris LaPierre
el 12 de Dic. de 2023
This is not an official MathWorks answer.
My observation is the following. You used to be able to define a rectangular ROI by specifying just 2 diagonal vertices. However, this behavior was undocumented. All doc examples and wording indicate you should specify all vertices. Apparently around R2022b, changes were made to the function that no longer allow you to specify a rectangular ROI with just 2 points.
This example highlights the risk of using undocumented behavior - it can change at any time without notice.
3 comentarios
Matt J
el 13 de Dic. de 2023
@Junichiro Kawahara Please Accept-click Cris' answer, seeing as you are happy with it.
DGM
el 13 de Dic. de 2023
Ah. I didn't even expect that to be a thing. That kind of makes the other bug report make more sense now.
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing 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!