Updated Sat, 29 Apr 2017 20:29:56 +0000
The points are given as the rows of a matrix and the coordinates of the points as the columns of the matrix. This simple function then determines if the given points lie on a common line or not. Works for any dimension and for any number of points. Instead of using the determinant, the stable rank function is used in the code. The algorithm behind it can be found here:
Zoltán Csáti (2023). collinear (https://www.mathworks.com/matlabcentral/fileexchange/62737-collinear), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
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.