File Exchange

image thumbnail

Point cloud normal vector

version 1.0 (1.76 KB) by

NORMND computes the vector normal to points in an N-D point cloud

8 Downloads

Updated

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.

Comments and Ratings (0)

MATLAB Release
MATLAB 8.1 (R2013a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video