Changeset 4205
- Timestamp:
- 06/24/10 16:17:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp
r1 r4205 28 28 int MatlabVectorToDoubleVector(double** pvector,int* pvector_rows,const mxArray* mxvector){ 29 29 30 int rows, cols;30 int rows,cols,size; 31 31 double* mxvector_ptr=NULL; 32 32 int ierr; … … 52 52 cols=mxGetN(mxvector); 53 53 nnz=mxGetNzmax(mxvector); 54 55 /*Check that input is actualy a vector*/ 56 if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols); 57 54 58 nz=(int)((double)nnz/(double)rows); 55 59 … … 78 82 cols=mxGetN(mxvector); 79 83 84 /*Check that input is actualy a vector*/ 85 if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols); 86 80 87 /*allocate and memcpy*/ 81 88 vector=(double*)xmalloc(rows*sizeof(double));
Note:
See TracChangeset
for help on using the changeset viewer.