fitting rectangle through data points
이전 댓글 표시
Let's say I have the data as shown in OXY plane(Here, I show 2 examples):
How can I fit the rectangle through data:

채택된 답변
추가 답변 (1개)
Image Analyst
2019년 5월 25일
1 개 추천
What I would try first is to use principal components analysis ("PCA") to identify the two axes. Use pca() if you have the stats toolbox. Then you can fit lines with polyfit() going through the points along each PC. Use the points at the limits to determine where the lines start and stop. Sorry, no I don't have code that does this already - I'd have to develop it just as you would.
Another method you might also try is RANSAC.
카테고리
도움말 센터 및 File Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





