Plane Fitting and Normal Calculation
Updated Mon, 26 Aug 2013 20:21:46 +0000
Given a set of x,y,z coordinates, find the best planar fit to the points via a least squares regression. Testing script "t_fitNormal" is also included to verify functionality and demonstrate usage.
> data = rand(50,3)*100;
> data(:,3) = data(:,1) * .4 + data(:,2) * .6 + rand(50,1);
> n = fitNormal(data,1)
Dan Couture (2023). Plane Fitting and Normal Calculation (https://www.mathworks.com/matlabcentral/fileexchange/37775-plane-fitting-and-normal-calculation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: Adjust Plane to Given Normal, Plane fit, threepoints2planez
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.