Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function y = edge_id(A,x,y)
- n = -1;
- i=1;
- [mx, ~] = size(A);
- while n == -1 && i <= mx
- if (A(i,1) == x && A(i,2) == y) || (A(i,1) == y && A(i,2) == x)
- n = i;
- end
- i=i+1;
- end
- y = n;
- end
Advertisement
Add Comment
Please, Sign In to add comment