Extract points in a defined direction and distance

버전 1.0.0.0 (27.2 KB) 작성자: Abdullah OZCAN
extract points in 'pk' that are in a direction relative to reference point 'p'
다운로드 수: 404
업데이트 날짜: 2016/1/3

라이선스 보기

'directionaldist' extract points in 'pk' that are in a direction relative
to reference point 'p' (Output: 'ind'). You can define distance interval
with 'r1' and 'r2', and also angle interval by 'dirAngle' and 'margin'.
It also extracts the nearest neighbor in the specified direction and
distance interval (Output: 'indMin').
Try the "demo.m" file for some illustration of the function.
Inputs
Data
'p': Reference point location 2x1
'pk': location of N points 2xN

Parameters
'r1': max distance to 'p' (Euclidean distance is used)
'r2': min distance to 'p' (Euclidean distance is used)
'dirAngle': reltaive direction angle from point 'p' to 'pk' (in degrees)
'margin': angle margin, will be used as defining the angle interval
[dirAngle+margin, dirAngle-margin]. If margin is zero, it is possible
that you will not find any points that are exactly at dirAngle direction.
So it is good to give some margin. Or it can be used for other purposes.
'dirType': direction type 'none' or 'symmetric', just try it out!

Outputs

'ind': indices of points of 'pk', which are in the direction of
[dirAngle+margin, dirAngle-margin] relative to reference point 'p',
where max distance to 'p' is 'r1', and min distance to 'p' is 'r2'.
'indMin': index of nearest neighbor point in 'pk' to 'p' in the specified
direction angle interval

Note: This function uses a function called 'nearestneighbour'
which is downloaded from fileexchange linke below:
(http://www.mathworks.com/matlabcentral/fileexchange/12574-nearestneighbour-m)

Copyright 2016 Abdullah H. Ozcan

인용 양식

Abdullah OZCAN (2024). Extract points in a defined direction and distance (https://www.mathworks.com/matlabcentral/fileexchange/54723-extract-points-in-a-defined-direction-and-distance), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
도움

받음: nearestneighbour.m

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0