Index: /issm/trunk-jpl/src/m/modules/ContourToMesh.m
===================================================================
--- /issm/trunk-jpl/src/m/modules/ContourToMesh.m	(revision 20846)
+++ /issm/trunk-jpl/src/m/modules/ContourToMesh.m	(revision 20847)
@@ -27,2 +27,14 @@
 %Call mex module
 [in_nod,in_elem] = ContourToMesh_matlab(index,x,y,contourname,interptype,edgevalue);
+
+switch(interptype)
+	case 'element'
+		varargout{1} = in_elem;
+	case 'node'
+		varargout{1} = in_nod;
+	case 'node and element'
+		varargout{1} = in_nod;
+		varargout{2} = in_elem;
+	otherwise
+		error(['interpolation type ''' interptype ''' not supported yet']);
+end
Index: /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp	(revision 20846)
+++ /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp	(revision 20847)
@@ -70,17 +70,6 @@
 
 	/* output: */
-	if (strcmp(interptype,"node")==0){
-		WriteData(PLHS0,in_nod,nods);
-		WriteData(PLHS1);
-	}
-	else if (strcmp(interptype,"element")==0){
-		WriteData(PLHS0,in_elem,nel);
-		WriteData(PLHS1);
-	}
-	else if (strcmp(interptype,"element and node")==0){
-		WriteData(PLHS0,in_nod,nods);
-		WriteData(PLHS1,in_elem,nel);
-	}
-	else _error_("wrong interpolation type");
+	WriteData(PLHS0,in_nod,nods);
+	WriteData(PLHS1,in_elem,nel);
 
 	/*Clean up*/
