Problem of robust fitting using the "robustfit" function
이전 댓글 표시
I am using the function "robustfit" to fit a plane(3D) but I have a problem: I do three different calls for this function but I have not the same result those are the calls: date: x, y, z (vectors) call-1: p = robustfit([x y],z) normal = [p(2) p(3) -1]/ norm([p(2) p(3) -1]) normal = 0.5448273 0.8371124 -0.0490510 call-2: p = robustfit([y z],x) normal = [-1 p(2) p(3)]/ norm([-1 p(2) p(3)]) normal = 0.5460477 0.8377283 -0.0065613 call-3: p = robustfit([x z],y) normal = [p(2) -1 p(3) ]/ norm([p(2) -1 p(3)]) normal = 0.5451328 0.8374704 -0.0043365 So how can I know which is the correct normal thank you in advance
채택된 답변
추가 답변 (1개)
Massinissa
2011년 4월 29일
0 개 추천
댓글 수: 1
Richard Willey
2011년 4월 29일
Hi Massinissa
From the sounds of things, the Principal Component Analysis based technique is the right way to go. If I understand your problem correctly, you want to identify a plane that best describes the data cloud coming from your scanner.
This isn't really a "fitting" task like regression. Rather, you're trying to describe the sources of variance in the model. PCA will work great for this.
regards,
Richard
카테고리
도움말 센터 및 File Exchange에서 Multiple Linear Regression에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!