Index: /issm/trunk/src/mex/SparseToVector/SparseToVector.cpp
===================================================================
--- /issm/trunk/src/mex/SparseToVector/SparseToVector.cpp	(revision 4751)
+++ /issm/trunk/src/mex/SparseToVector/SparseToVector.cpp	(revision 4752)
@@ -17,17 +17,11 @@
 	double   *prd=NULL;
 
-	/* Check for proper number of arguments */
-   
-	if      (nrhs == 0 && nlhs == 0) {
-		SparseToVectorUsage();
-		return;
-	}
-	else if (nrhs <  1 || nlhs < 2 || nlhs > 6) {
-		SparseToVectorUsage();
-		mexErrMsgTxt(" ");
-	}
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&SparseToVectorUsage);
 
 	/* Create matrices for the return arguments */
-
 	if (!mxIsNumeric(A_IN) || !mxIsSparse(A_IN)) {
 		mexPrintf("%s -- Input matrix must be numeric and sparse.\n",__FUNCT__);
@@ -80,4 +74,7 @@
 				  __FUNCT__,mxGetM(A_IN),mxGetN(A_IN),mxGetNzmax(A_IN));
 	}
+	
+	/*end module: */
+	MODULEEND();
 }
 
