DISTANCE2LINE c++ mex

版本 1.1 (19.8 KB) 作者: Mehmet OZTURK
Orthogonal euclidean distances of points to a line with c++ mex
283.0 次下载
更新时间 2014/11/20

查看许可证

[DISTANCES PROJ_POINTS]=DISTANCE2LINE(POINTS,LINE_SEG)
This function distance2line computes minimum euclidean distances (vertical distances) of "points" (nxm matrix which m=2,3) to a "line" (1xm which m=2,3). The input "line" is defined by its two points that lying on this line

The output "distances" is a nx1 vector matrix consisting of distances of points to the line. The second output "proj_points" is also a nxm matrix and this matrix gives the coordinates of vertically projected points onto the line.

I did not include any input error checking for the speed considerations because i use this function in a loop in MATLAB. So this function must be used with care.

You can use the provided example file for usage.

Mehmet OZTURK, 2011

引用格式

Mehmet OZTURK (2024). DISTANCE2LINE c++ mex (https://www.mathworks.com/matlabcentral/fileexchange/32110-distance2line-c-mex), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Constants and Test Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1

will be available as a Toolbox file

1.0.0.0