[n, collinear] = sw_nvect(V)
[n, collinear] = sw_nvect(V,epsilon)
[n, collinear] = sw_nvect(V) determines whether the given set of
vectors are collinear or coplanar. If they are coplanar, it returns the
best fitting normal vector, while if they are collinear returns the
average of the given vector.
The function can also deal with complex vectors, separating the real and complex parts as separate vectors.
[n, collinear] = sw_nvect(V,epsilon) also gives the upper limit of the
collinearity controlled by
- Matrix of column vectors with dimensions of . Where each column defines a vector.
- Defines the limits of collinearity with the following values:
1the function always return the
nclosest to the collinear direction,
2the function always return the
nvector closest to the normal of the coplanar plane.
eupper limit of collinearity, default value is 0.1, smaller positive values mean stricter limits on collinearity.
- Row vector parallel to the collinear vector direction or perpendicular to the best fitting plane of the coplanar vectors.
trueif the given set of vectors are collinear.