Point cloud normal vector

NORMND computes the vector normal to points in an N-D point cloud
1.7K Downloads
Updated 3 May 2013

View License

normnd(DATA) computes the vector normal to the N-dimensional sample
point locations in DATA. DATA is defined as an MxN matrix where M is
the number of samples. Each column contains the sample locations in
each of the orthogonal dimensions in N-dimensional space

Example:
% Compute the normal vector to 3-D sample points
data = randn(20,3);
% Bias the normal vector toward the Z-axis
data(:,3) = data(:,3)./10;
v = normnd(data);
% Plot
figure; scatter3(data(:,1),data(:,2),data(:,3));
hold on; quiver3(mean(data(:,1)),mean(data(:,2)),mean(data(:,3)),v(1),v(2),v(3))

See also: cov, eig.

Cite As

Jered Wells (2024). Point cloud normal vector (https://www.mathworks.com/matlabcentral/fileexchange/41609-point-cloud-normal-vector), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0