- Timestamp:
- 05/12/10 23:02:03 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/itpp/itmex.h
r813 r937 336 336 int i, size; 337 337 double* temp = (double*) mxGetPr(in); 338 if (temp == 0) mexErrMsgTxt("mxArray2ivec: Pointer to data is NULL");339 338 340 339 size = mxGetNumberOfElements(in); 341 if ( size == 0) mexErrMsgTxt("mxArray2ivec: Size of data is zero");340 if ((size > 0) && (temp == 0)) mexErrMsgTxt("mxArray2ivec: Size of data is zero"); 342 341 343 342 out.set_size(size, false); … … 356 355 int i, size; 357 356 double* temp = (double*) mxGetPr(in); 358 if (temp == 0) mexErrMsgTxt("mxArray2vec: Pointer to data is NULL");359 357 360 358 size = mxGetNumberOfElements(in); 361 if ( size == 0) mexErrMsgTxt("mxArray2vec: Size of data is zero");362 359 if ((size >0) && (temp == 0)) mexErrMsgTxt("mxArray2vec: Pointer to data is NULL"); 360 363 361 out.set_size(size, false); 364 362 … … 577 575 { 578 576 double* temp = (double *) mxGetPr(out); 579 if (temp == 0) mexErrMsgTxt("vec2mxArray: Pointer to data is NULL"); 580 if (in.size() == 0) mexErrMsgTxt("vec2mxArray: Size of data is zero"); 577 if ((in.size() > 0) && (temp == 0)) mexErrMsgTxt("vec2mxArray: Pointer to data is NULL"); 581 578 582 579 for (int i = 0; i < in.size(); i++) {