coordinates of x y
0001 0002 function [idx] = findNodeIndex(x,y,nodeList) 0003 %coordinates of x y 0004 idx = 0; 0005 idx_row = find(nodeList(:,1) == x); 0006 for i = 1:length(idx_row) 0007 if nodeList(idx_row(i),2) == y 0008 idx = idx_row(i); 0009 return 0010 end; 0011 end; 0012 0013 if idx == 0 0014 disp('ERROR in findNodeIndex: Index not found') 0015 end;