Index: /issm/trunk/src/m/utils/Mesh/intersections.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/intersections.m	(revision 4040)
+++ /issm/trunk/src/m/utils/Mesh/intersections.m	(revision 4041)
@@ -148,4 +148,15 @@
 	repmat(max(y1(1:end-1),y1(2:end)),1,n2) >= ...
 	repmat(min(y2(1:end-1),y2(2:end)).',n1,1));
+
+% For one segment in x1,y1, i and j are returned as row vectors.  They
+% need to be column vectors, or iout and jout below will err out.
+% (jes, 6/11/10)
+
+if (size(i,1) == 1)
+    i=i';
+end
+if (size(j,1) == 1)
+    j=j';
+end
 
 % Find segments pairs which have at least one vertex = NaN and remove them.
