diff pointIndex.m @ 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
children
line wrap: on
line diff
--- /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