Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 11669)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 11670)
@@ -1,3 +1,3 @@
-INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@  @METISINCL@  @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@  @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@  @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@
+INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@  @METISINCL@  @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@  @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@  @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@ @ADIC2INCL@ @ADOLCINCL@
 EXEEXT=$(ISSMEXT)
 
@@ -120,4 +120,8 @@
 					./objects/Numerics/ElementVector.h\
 					./objects/Numerics/ElementVector.cpp\
+					./objects/Numerics/Matrix.h\
+					./objects/Numerics/Matrix.cpp\
+					./objects/Numerics/Vector.h\
+					./objects/Numerics/Vector.cpp\
 					./objects/Params/Param.h\
 					./objects/Params/BoolParam.cpp\
@@ -724,4 +728,6 @@
 				    ./toolkits/matlab/matlabincludes.h\
 				    ./toolkits/matlab/MatlabNArrayToNArray.cpp\
+				    ./toolkits/matlab/MatlabMatrixToMatrix.cpp\
+				    ./toolkits/matlab/MatlabVectorToVector.cpp\
 				    ./io/Matlab/matlabio.h\
 				    ./io/Matlab/WriteMatlabData.cpp\
Index: /issm/trunk-jpl/src/c/io/Matlab/FetchMatlabData.cpp
===================================================================
--- /issm/trunk-jpl/src/c/io/Matlab/FetchMatlabData.cpp	(revision 11669)
+++ /issm/trunk-jpl/src/c/io/Matlab/FetchMatlabData.cpp	(revision 11670)
@@ -305,4 +305,31 @@
 }
 /*}}}*/
+/*FUNCTION FetchMatlabData(Matrix** pmatrix,const mxArray* dataref){{{1*/
+void FetchMatlabData(Matrix** pmatrix,const mxArray* dataref){
+	
+	Matrix* outmatrix=NULL;
+	int dummy=0;
+
+	if (mxIsClass(dataref,"double") ){
+
+		/*Check dataref is not pointing to NaN: */
+		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
+			outmatrix=NULL;
+		}
+		else{
+
+			/*Convert matlab matrix to petsc matrix: */
+			outmatrix=MatlabMatrixToMatrix(dataref);
+		}
+	}
+	else{
+		/*This is an error: we don't have the correct input!: */
+		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+	}
+
+	/*Assign output pointers:*/
+	*pmatrix=outmatrix;
+}
+/*}}}*/
 /*FUNCTION FetchMatlabData(double** pvector,int* pM,const mxArray* dataref){{{1*/
 void FetchMatlabData(double** pvector,int* pM,const mxArray* dataref){
@@ -442,4 +469,28 @@
 		/*Convert matlab vector to petsc vector: */
 		MatlabVectorToPetscVector(&vector,&dummy,dataref);
+	}
+	else{
+		/*This is an error: we don't have the correct input!: */
+		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+	}
+
+	/*Assign output pointers:*/
+	*pvector=vector;
+}
+/*}}}*/
+/*FUNCTION FetchMatlabData(Vector** pvector,const mxArray* dataref){{{1*/
+void FetchMatlabData(Vector** pvector,const mxArray* dataref){
+
+	Vector* vector=NULL;
+	int dummy;
+
+	if(mxIsEmpty(dataref)){
+		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
+		vector=NULL;
+	}
+	else if (mxIsClass(dataref,"double") ){
+
+		/*Convert matlab vector to petsc vector: */
+		vector=MatlabVectorToVector(dataref);
 	}
 	else{
Index: /issm/trunk-jpl/src/c/io/Matlab/WriteMatlabData.cpp
===================================================================
--- /issm/trunk-jpl/src/c/io/Matlab/WriteMatlabData.cpp	(revision 11669)
+++ /issm/trunk-jpl/src/c/io/Matlab/WriteMatlabData.cpp	(revision 11670)
@@ -58,4 +58,21 @@
 }
 /*}}}*/
+/*FUNCTION WriteMatlabData(mxArray** pdataref,Matrix* matrix){{{1*/
+void WriteMatlabData(mxArray** pdataref,Matrix* matrix){
+		
+	mxArray* dataref=NULL;
+	
+	if(matrix){
+		
+		/*call toolkit routine: */
+		dataref=matrix->ToMatlabMatrix();
+	}
+	else{
+		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+	}
+
+	*pdataref=dataref;
+}
+/*}}}*/
 /*FUNCTION WriteMatlabData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
 void WriteMatlabData(mxArray** pdataref,double* matrix, int M,int N){
@@ -117,4 +134,21 @@
 		/*call toolkit routine: */
 		PetscVectorToMatlabVector(&dataref,vector);
+	}
+	else{
+		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+	}
+	*pdataref=dataref;
+
+}
+/*}}}*/
+/*FUNCTION WriteMatlabData(mxArray** pdataref,Vector* vector){{{1*/
+void WriteMatlabData(mxArray** pdataref,Vector* vector){
+	
+	mxArray* dataref=NULL;
+	
+	if(vector){
+		
+		/*call toolkit routine: */
+		dataref=vector->ToMatlabVector();
 	}
 	else{
Index: /issm/trunk-jpl/src/c/io/Matlab/matlabio.h
===================================================================
--- /issm/trunk-jpl/src/c/io/Matlab/matlabio.h	(revision 11669)
+++ /issm/trunk-jpl/src/c/io/Matlab/matlabio.h	(revision 11670)
@@ -17,7 +17,9 @@
 void WriteMatlabData(mxArray** pdataref,DataSet* dataset);
 void WriteMatlabData(mxArray** pdataref,Mat matrix);
+void WriteMatlabData(mxArray** pdataref,Matrix* matrix);
 void WriteMatlabData(mxArray** pdataref,double* matrix, int M,int N);
 void WriteMatlabData(mxArray** pdataref,int*    matrix, int M,int N);
 void WriteMatlabData(mxArray** pdataref,Vec vector);
+void WriteMatlabData(mxArray** pdataref,Vector* vector);
 void WriteMatlabData(mxArray** pdataref,double* vector, int M);
 void WriteMatlabData(mxArray** pdataref,int integer);
@@ -34,4 +36,5 @@
 void FetchMatlabData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
 void FetchMatlabData(Mat* pmatrix,const mxArray* dataref);
+void FetchMatlabData(Matrix** pmatrix,const mxArray* dataref);
 void FetchMatlabData(int** pvector,int* pM,const mxArray* dataref);
 void FetchMatlabData(float** pvector,int* pM,const mxArray* dataref);
@@ -39,4 +42,5 @@
 void FetchMatlabData(bool** pvector,int* pM,const mxArray* dataref);
 void FetchMatlabData(Vec* pvector,const mxArray* dataref);
+void FetchMatlabData(Vector** pvector,const mxArray* dataref);
 void FetchMatlabData(char** pstring,const mxArray* dataref);
 void FetchMatlabData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
Index: /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 11670)
+++ /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 11670)
@@ -0,0 +1,145 @@
+/*!\file Matrix.cpp
+ * \brief: implementation of the Matrix object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+#include "./Matrix.h"
+/*}}}*/
+
+/*Matrix constructors and destructor*/
+/*FUNCTION Matrix::Matrix(){{{1*/
+Matrix::Matrix(){
+
+	this->M=0;
+	this->N=0;
+
+	#ifdef _HAVE_PETSC_
+	this->matrix=NULL;
+	#else
+	this->matrix=NULL;
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->amatrix=NULL;
+	#endif
+}
+/*}}}*/
+/*FUNCTION Matrix::Matrix(int M,int N){{{1*/
+Matrix::Matrix(int pM,int pN){
+
+	this->M=pM;
+	this->N=pN;
+
+	#ifdef _HAVE_PETSC_
+	this->matrix=NewMat(pM,pN);
+	#else
+	this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->amatrix=(adouble*)xmalloc(pM*pN*sizeof(adouble));
+	#endif
+}
+/*}}}*/
+/*FUNCTION Matrix::Matrix(int M,int N,double sparsity){{{1*/
+Matrix::Matrix(int pM,int pN,double sparsity){
+
+	this->M=pM;
+	this->N=pN;
+
+	#ifdef _HAVE_PETSC_
+	this->matrix=NewMat(pM,pN,sparsity);
+	#else
+	this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->amatrix=(adouble*)xmalloc(pM*pN*sizeof(adouble));
+	#endif
+}
+/*}}}*/
+/*FUNCTION Matrix::Matrix(int M,int N,int connectivity,int numberofdofspernode){{{1*/
+Matrix::Matrix(int pM,int pN,int connectivity,int numberofdofspernode){
+	
+	this->M=pM;
+	this->N=pN;
+
+	#ifdef _HAVE_PETSC_
+	this->matrix=NewMat(pM,pN,connectivity,numberofdofspernode);
+	#else
+	this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->amatrix=(adouble*)xmalloc(pM*pN*sizeof(adouble));
+	#endif
+}
+/*}}}*/
+/*FUNCTION Matrix::~Matrix(){{{1*/
+Matrix::~Matrix(){
+
+ 	#ifdef _HAVE_PETSC_
+	MatFree(&this->matrix);
+	#else
+	xfree((void**)&this->matrix);
+	#endif
+	#ifdef _HAVE_ADOLC_
+	xfree((void**)&this->amatrix);
+	#endif
+}
+/*}}}*/
+
+/*Matrix specific routines: */
+/*FUNCTION Matrix::Echo{{{1*/
+void Matrix::Echo(void){
+
+	int i,j;
+
+	#ifdef _HAVE_PETSC_
+	MatView(this->matrix,PETSC_VIEWER_STDOUT_WORLD);
+	#else
+	printf("Matrix size: %i-%i\n",M,N);
+	for(i=0;i<M;i++){
+		for(j=0;j<N;j++){
+			printf("%g ",*(matrix+N*i+j));
+		}
+		printf("\n");
+	}
+	#endif
+
+	#ifdef _HAVE_ADOLC_
+	/*Not sure about that one. Should we use the overloaded operator >>?*/
+	printf("ADOLC Matrix equivalent:" );
+	for(i=0;i<M;i++){
+		for(j=0;j<N;j++){
+			printf("%g ",*(amatrix+N*i+j));
+		}
+		printf("\n");
+	}
+	#endif
+}
+/*}}}*/
+
+#ifdef _SERIAL_
+/*FUNCTION Matrix::ToMatlabMatrix{{{1*/
+mxArray* Matrix::ToMatlabMatrix(void){
+
+	mxArray* dataref=NULL;
+	#ifdef _HAVE_PETSC_
+	PetscMatrixToMatlabMatrix(&dataref,this->matrix);
+	#else
+	_error_("not implemented yet!");
+	#endif
+
+}
+/*}}}*/
+#endif
Index: /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 11670)
+++ /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 11670)
@@ -0,0 +1,60 @@
+/*!\file:  Matrix.h
+ * \brief wrapper to matrix objects. The goal is to control which API (PETSC,Scalpack, Plapack?) 
+ * implements our underlying matrix format.
+ */ 
+
+#ifndef _MATRIX_H_
+#define _MATRIX_H_
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+#include "../Object.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#ifdef _HAVE_ADOLC_
+#include "adolc.h"
+#endif
+
+#ifdef _SERIAL_
+#include "mex.h"
+#endif
+
+/*}}}*/
+
+class Matrix{
+
+	public:
+	
+		int M,N; 
+
+		#ifdef _HAVE_PETSC_
+		Mat matrix; 
+		#else
+		double* matrix; 
+		#endif
+		#ifdef _HAVE_ADOLC_
+		adouble* amatrix;
+		#endif
+
+		/*Matrix constructors, destructors {{{1*/
+		Matrix();
+		Matrix(int M,int N);
+		Matrix(int M,int N,double sparsity);
+		Matrix(int M,int N,int connectivity,int numberofdofspernode);
+		~Matrix();
+		/*}}}*/
+		/*Matrix specific routines {{{1*/
+		void Echo(void);
+		#ifdef _SERIAL_
+		mxArray* ToMatlabMatrix(void);
+		#endif
+		/*}}}*/
+
+};
+#endif //#ifndef _MATRIX_H_
Index: /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 11670)
+++ /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 11670)
@@ -0,0 +1,103 @@
+/*!\file Vector.cpp
+ * \brief: implementation of the Vector object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+#include "./Vector.h"
+/*}}}*/
+
+/*Vector constructors and destructor*/
+/*FUNCTION Vector::Vector(){{{1*/
+Vector::Vector(){
+
+	#ifdef _HAVE_PETSC_
+	this->vector=NULL;
+	#else
+	this->vector=NULL;
+	this->M=0;
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->avector=NULL;
+	#endif
+}
+/*}}}*/
+/*FUNCTION Vector::Vector(int M,bool fromlocalsize){{{1*/
+Vector::Vector(int pM,bool fromlocalsize){
+
+	#ifdef _HAVE_PETSC_
+	this->vector=NewVec(pM,fromlocalsize);
+	#else
+	this->M=pM;
+	this->vector=(double*)xcalloc(pM,sizeof(double));
+	#endif
+	#ifdef _HAVE_ADOLC_
+	this->avector=(adouble*)xmalloc(pM*sizeof(adouble));
+	#endif
+}
+/*}}}*/
+/*FUNCTION Vector::~Vector(){{{1*/
+Vector::~Vector(){
+
+ 	#ifdef _HAVE_PETSC_
+	VecFree(&this->vector);
+	#else
+	xfree((void**)&this->vector);
+	#endif
+	#ifdef _HAVE_ADOLC_
+	xfree((void**)&this->avector);
+	#endif
+}
+/*}}}*/
+
+/*Vector specific routines: */
+/*FUNCTION Vector::Echo{{{1*/
+void Vector::Echo(void){
+
+	int i;
+
+	#ifdef _HAVE_PETSC_
+	VecView(this->vector,PETSC_VIEWER_STDOUT_WORLD);
+	#else
+	printf("Vector size: %i\n",M);
+	for(i=0;i<M;i++){
+		printf("%g\n ",*(vector+i));
+	}
+	#endif
+
+	#ifdef _HAVE_ADOLC_
+	/*Not sure about that one. Should we use the overloaded operator >>?*/
+	printf("ADOLC Vector equivalent:" );
+	for(i=0;i<M;i++){
+		printf("%g\n ",*(avector+i));
+	}
+	#endif
+}
+/*}}}*/
+
+#ifdef _SERIAL_
+/*FUNCTION Vector::ToMatlabVector{{{1*/
+mxArray* Vector::ToMatlabVector(void){
+
+	mxArray* dataref=NULL;
+	#ifdef _HAVE_PETSC_
+	PetscVectorToMatlabVector(&dataref,this->vector);
+	#else
+	_error_("not implemented yet!");
+	#endif
+
+}
+/*}}}*/
+#endif
Index: /issm/trunk-jpl/src/c/objects/Numerics/Vector.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 11670)
+++ /issm/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 11670)
@@ -0,0 +1,58 @@
+/*!\file:  Vector.h
+ * \brief wrapper to vector objects. The goal is to control which API (PETSC,Scalpack, Plapack?) 
+ * implements our underlying vector format.
+ */ 
+
+#ifndef _VECTOR_H_
+#define _VECTOR_H_
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+#include "../Object.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#ifdef _HAVE_ADOLC_
+#include "adolc.h"
+#endif
+		
+
+#ifdef _SERIAL_
+#include "mex.h"
+#endif
+
+/*}}}*/
+
+class Vector{
+
+	public:
+	
+		int M;
+
+		#ifdef _HAVE_PETSC_
+		Vec vector; 
+		#else
+		double* vector; 
+		#endif
+		#ifdef _HAVE_ADOLC_
+		adouble* avector;
+		#endif
+
+		/*Vector constructors, destructors {{{1*/
+		Vector();
+		Vector(int M,bool fromlocalsize=false);
+		~Vector();
+		/*}}}*/
+		/*Vector specific routines {{{1*/
+		void Echo(void);
+		#ifdef _SERIAL_
+		mxArray* ToMatlabVector(void);
+		#endif
+		/*}}}*/
+};
+#endif //#ifndef _VECTOR_H_
Index: /issm/trunk-jpl/src/c/objects/objects.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/objects.h	(revision 11669)
+++ /issm/trunk-jpl/src/c/objects/objects.h	(revision 11670)
@@ -120,4 +120,6 @@
 #include "./Numerics/ElementMatrix.h"
 #include "./Numerics/ElementVector.h"
+#include "./Numerics/Vector.h"
+#include "./Numerics/Matrix.h"
 
 /*Params: */
Index: /issm/trunk-jpl/src/c/toolkits/matlab/MatlabMatrixToMatrix.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/matlab/MatlabMatrixToMatrix.cpp	(revision 11670)
+++ /issm/trunk-jpl/src/c/toolkits/matlab/MatlabMatrixToMatrix.cpp	(revision 11670)
@@ -0,0 +1,36 @@
+/* \file MatlabMatrixToMatrix.cpp
+ * \brief: convert a sparse or dense matlab matrix to a matrix:
+ */
+
+
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+
+#ifdef _SERIAL_
+
+/*Matlab includes: */
+#include "mex.h"
+#include "../../objects/objects.h"
+
+Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix){
+
+	Matrix* matrix=NULL;
+
+	#ifdef _HAVE_PETSC_
+	/*allocate matrix object: */
+	matrix=new Matrix();
+	
+	/*Call Matlab to Petsc API: */
+	MatlabMatrixToPetscMatrix(&matrix->matrix,&matrix->M,&matrix->N,mxmatrix);
+
+	#else
+		_error_("not supported yet!");
+	#endif
+
+	return matrix;
+}
+#endif
Index: /issm/trunk-jpl/src/c/toolkits/matlab/MatlabVectorToVector.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/matlab/MatlabVectorToVector.cpp	(revision 11670)
+++ /issm/trunk-jpl/src/c/toolkits/matlab/MatlabVectorToVector.cpp	(revision 11670)
@@ -0,0 +1,36 @@
+/* \file MatlabVectorToVector.cpp
+ * \brief: convert a sparse or dense matlab vector to a vector:
+ */
+
+
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+
+#ifdef _SERIAL_
+
+/*Matlab includes: */
+#include "mex.h"
+#include "../../objects/objects.h"
+
+Vector* MatlabVectorToVector(const mxArray* mxvector){
+
+	Vector* vector=NULL;
+
+	#ifdef _HAVE_PETSC_
+	/*allocate vector object: */
+	vector=new Vector();
+	
+	/*Call Matlab to Petsc API: */
+	MatlabVectorToPetscVector(&vector->vector,&vector->M,mxvector);
+
+	#else
+		_error_("not supported yet!");
+	#endif
+
+	return vector;
+}
+#endif
Index: /issm/trunk-jpl/src/c/toolkits/matlab/matlabincludes.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/matlab/matlabincludes.h	(revision 11669)
+++ /issm/trunk-jpl/src/c/toolkits/matlab/matlabincludes.h	(revision 11670)
@@ -8,7 +8,12 @@
 #ifdef _SERIAL_
 #include <mex.h>
+class Matrix;
+class Vector;
+
 int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
 int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
 int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
+Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix);
+Vector* MatlabVectorToVector(const mxArray* mxvector);
 #endif
 
