Changeset 14005
- Timestamp:
- 11/27/12 09:46:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp
r13749 r14005 264 264 265 265 double* outvector=NULL; 266 int outvector_rows; 267 268 if(mxIsEmpty(dataref)){ 269 /*Nothing to pick up. Just initialize matrix pointer to NULL: */ 270 outvector_rows=0; 271 outvector=NULL; 272 } 273 else if (mxIsClass(dataref,"double") ){ 274 275 /*Convert matlab vector to double* vector: */ 276 MatlabVectorToDoubleVector(&outvector,&outvector_rows,dataref); 277 278 } 279 else{ 280 /*This is an error: we don't have the correct input!: */ 281 _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet"); 266 int M,N; 267 268 /*Use Fetch matrix*/ 269 FetchData(pvector,&M,&N,dataref) ; 270 271 /*Check that it is a vector*/ 272 if(M>0){ 273 if(N!=1) _error_("input vector of size " << M << "x" << N << " should have only one column"); 282 274 } 283 275 284 276 /*Assign output pointers:*/ 285 277 *pvector=outvector; 286 if (pM)*pM=outvector_rows;278 if(pM)*pM=M; 287 279 } 288 280 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.