Mercurial > repos > public > sbplib
changeset 765:bb079b39a7bb feature/grids
Add function for findind indecies of points in a list of points
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 21 Jun 2018 16:54:27 +0200 |
parents | e05465aa2e25 |
children | afd20f023928 |
files | pointIndex.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r e05465aa2e25 -r bb079b39a7bb pointIndex.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pointIndex.m Thu Jun 21 16:54:27 2018 +0200 @@ -0,0 +1,4 @@ +% Get the index of the points p within the tall array of points ps +function [I, ok] = pointIndex(p, ps) + [ok, I] = ismember(p, ps, 'rows'); +end