REVERSEEDGE Intervert the source and target vertices of edge. REV = reverseEdge(EDGE); Returns the opposite edge of EDGE. EDGE has the format [X1 Y1 X2 Y2]. The resulting edge REV has value [X2 Y2 X1 Y1]; See also: edges2d, createEdge, reverseLine ------ Author: David Legland e-mail: david.legland@grignon.inra.fr Created: 2010-05-13, using Matlab 7.9.0.529 (R2009b) Copyright 2010 INRA - Cepia Software Platform.
0001 function res = reverseEdge(edge) 0002 %REVERSEEDGE Intervert the source and target vertices of edge. 0003 % 0004 % REV = reverseEdge(EDGE); 0005 % Returns the opposite edge of EDGE. 0006 % EDGE has the format [X1 Y1 X2 Y2]. The resulting edge REV has value 0007 % [X2 Y2 X1 Y1]; 0008 % 0009 % See also: 0010 % edges2d, createEdge, reverseLine 0011 % 0012 % ------ 0013 % Author: David Legland 0014 % e-mail: david.legland@grignon.inra.fr 0015 % Created: 2010-05-13, using Matlab 7.9.0.529 (R2009b) 0016 % Copyright 2010 INRA - Cepia Software Platform. 0017 0018 res = [edge(:,3:4) edge(:,1:2)];