Home > src > BN_pol_rec > functions > findNodeIndex.m

findNodeIndex

PURPOSE ^

coordinates of x y

SYNOPSIS ^

function [idx] = findNodeIndex(x,y,nodeList)

DESCRIPTION ^

coordinates of x y

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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;

Generated on Wed 16-Mar-2005 09:17:47 by m2html © 2003