Changeset 154 for trunk/src/matlab/rpLibResult.cc
- Timestamp:
- Jan 11, 2006, 3:55:15 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/matlab/rpLibResult.cc
r135 r154 3 3 * INTERFACE: Matlab Rappture Library Source 4 4 * 5 * rpLibResult(lib)5 * [err] = rpLibResult(lib) 6 6 * 7 7 * ====================================================================== … … 16 16 #include "RpMatlabInterface.h" 17 17 18 /**********************************************************************/ 19 // METHOD: [err] = rpLibResult (libHandle) 20 /// Write Rappture Library to run.xml and signal end of processing. 21 /** 22 * Usually the last call of the program, this function signals to the gui 23 * that processing has completed and the output is ready to be 24 * displayed 25 */ 26 18 27 void mexFunction(int nlhs, mxArray *plhs[], 19 28 int nrhs, const mxArray *prhs[]) 20 29 { 21 const char *output_buf;22 30 int libIndex = 0; 31 int err = 1; 23 32 RpLibrary* lib = NULL; 24 33 … … 26 35 if (nrhs != 1) 27 36 mexErrMsgTxt("One input required."); 28 else if (nlhs > 0)37 else if (nlhs > 1) 29 38 mexErrMsgTxt("Too many output arguments."); 30 39 … … 37 46 if (lib) { 38 47 rpResult(lib); 48 err = 0; 39 49 // cleanLibDict(); 40 50 } 41 51 } 42 52 43 /* Set C-style string output_buf to MATLAB mexFunction output*/ 44 plhs[0] = mxCreateString(output_buf); 53 plhs[0] = mxCreateDoubleScalar(err); 45 54 46 55 return;
Note: See TracChangeset
for help on using the changeset viewer.