plane_fit

버전 1.0.0.0 (1.48 KB) 작성자: Kevin Moerman
Fits a plane to 3D data using singular value decomposition
다운로드 수: 2.7K
업데이트 날짜: 2008/11/10

라이선스 보기

Fits a plane of the from z=Ax+By+C to the data and provides the coefficients A,B and C. The functions uses the svd command (singular value decomposition).

%% EXAMPLE
[x,y]=meshgrid(linspace(0,10,20),linspace(0,10,20));
a=1; b=2; c=-2;
z=(a*x)+(b*y)+c;
x=x(:); y=y(:); z=z(:);
z=z+(randn(length(z),1));
[A,B,C]=plane_fit(x,y,z);
[X,Y]=meshgrid(linspace(min(x),max(x),20),linspace(min(y),max(y),20));
Z=(A*X)+(B*Y)+C;
plot3(x,y,z,'r.'); hold on; grid on;
surf(X,Y,Z,'FaceColor','g'); alpha(0.5);
title(['a=',num2str(a), ', A=',num2str(A),', b=',num2str(b),', B=',num2str(B),', c=',num2str(c),', C=',num2str(C)]);

인용 양식

Kevin Moerman (2024). plane_fit (https://www.mathworks.com/matlabcentral/fileexchange/22042-plane_fit), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Linear Algebra에 대해 자세히 알아보기
도움

줌: threepoints2planez

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0