Index: /issm/trunk/src/m/utils/Interp/PatchToVec.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/PatchToVec.m	(revision 4951)
+++ /issm/trunk/src/m/utils/Interp/PatchToVec.m	(revision 4951)
@@ -0,0 +1,9 @@
+function vec=PatchToVec(Patch);
+%PATCHTOVEC - converts a patch to a vector by averaging over each vertex
+%
+%   Usage:
+%      vec=PatchToVec(Patch)
+
+connectivity=sparse(Patch.index(:),1,1);
+value       =sparse(Patch.index(:),1,Patch.value(:));
+vec=full(value./connectivity);
