Changeset 374
- Timestamp:
- 05/13/09 08:37:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp
r1 r374 106 106 /*Ok, allocate arrays: */ 107 107 dataref = mxCreateSparse((mwSize)0,(mwSize)0,(mwSize)0,mxREAL); 108 108 109 mxSetM(dataref,(mwSize)cols); 110 mxSetN(dataref,(mwSize)rows); 111 mxSetNzmax(dataref,(mwSize)nzmax); 112 109 113 if(nnz){ 110 114 /* free first to avoid mem leaks...: */ … … 114 118 115 119 /* ...then set data: */ 116 mxSetM(dataref,(mwSize)cols);117 mxSetN(dataref,(mwSize)rows);118 mxSetNzmax(dataref,(mwSize)nzmax);119 120 mxSetData( dataref, val); 120 121 mxSetIr(dataref,col_ind);
Note:
See TracChangeset
for help on using the changeset viewer.