Index: /issm/trunk/src/m/classes/public/SectionValues.m
===================================================================
--- /issm/trunk/src/m/classes/public/SectionValues.m	(revision 2746)
+++ /issm/trunk/src/m/classes/public/SectionValues.m	(revision 2747)
@@ -7,10 +7,20 @@
 %   Usage:
 %      [elements,x,y,z,s,data]=SectionValues(md,data,filename,resolution)
+%      [elements,x,y,z,s,data]=SectionValues(md,data,profile_structure,resolution)
 
-%read infile:
-contempt=expread(infile,1);
-nods=contempt.nods;
-x=contempt.x;
-y=contempt.y;
+%check what we have for profile as input
+if ischar(infile),
+	%read infile:
+	contempt=expread(infile,1);
+	nods=contempt.nods;
+	x=contempt.x;
+	y=contempt.y;
+else
+	%read infile:
+	nods=infile.nods;
+	x=infile.x;
+	y=infile.y;
+end
+
 
 %get the specified resolution
