Index: /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 4971)
+++ /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 4972)
@@ -147,6 +147,6 @@
 	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
 	if(M){
-		memcpy(marshalled_dataset,mdim_array,M*sizeof(double));marshalled_dataset+=M*sizeof(int);
-		memcpy(marshalled_dataset,ndim_array,M*sizeof(double));marshalled_dataset+=M*sizeof(int);
+		memcpy(marshalled_dataset,mdim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+		memcpy(marshalled_dataset,ndim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
 		for(i=0;i<M;i++){
 			double* matrix=this->array[i];
@@ -332,6 +332,6 @@
 	
 		pfield2=mxCreateDoubleMatrix(0,0,mxREAL);
-		mxSetM(pfield2,m);
-		mxSetN(pfield2,n);
+		mxSetM(pfield2,n);
+		mxSetN(pfield2,m);
 		mxSetPr(pfield2,outmatrix);
 
