Show
Ignore:
Timestamp:
01/29/10 19:56:45 (14 years ago)
Author:
smidl
Message:

UI changes for MixEF_init

Location:
applications/bdmtoolbox/mex
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/mex/epdf_mean.cpp

    r756 r796  
    2828        shared_ptr<epdf> ep=UI::build<epdf>(Cfg); 
    2929         
    30          
    31         if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 
    32         output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 
    33         vec2mxArray(ep->mean(), output[0]); 
     30        if (ep){         
     31                //if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 
     32                output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 
     33                vec2mxArray(ep->mean(), output[0]); 
     34        } else {  
     35                mexErrMsgTxt ( "Given object is not epdf" ); 
     36        } 
    3437} 
    3538#endif 
  • applications/bdmtoolbox/mex/epdf_variance.cpp

    r761 r796  
    2727 
    2828        shared_ptr<epdf> ep=UI::build<epdf>(Cfg); 
     29 
     30        if (ep) { 
     31                output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 
     32                vec2mxArray(ep->variance(), output[0]); 
     33        } else {  
     34                mexErrMsgTxt ( "Given object is not epdf" ); 
     35        } 
    2936         
    30          
    31         if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 
    32         output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 
    33         vec2mxArray(ep->variance(), output[0]); 
    3437} 
    3538#endif