Show
Ignore:
Timestamp:
06/24/09 13:38:47 (16 years ago)
Author:
mido
Message:

UI documentation almost finished; UIException redesigned and used instead of UI::ui_error function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/mexfiles.html

    r385 r396  
    55<link href="doxygen.css" rel="stylesheet" type="text/css"> 
    66</head><body> 
    7 <!-- Generated by Doxygen 1.5.8 --> 
     7<!-- Generated by Doxygen 1.5.9 --> 
    88<script type="text/javascript"> 
    99<!-- 
     
    7676</pre></div> on Linux, or <div class="fragment"><pre class="fragment">$ ./buildmex.bat my_mex_file.cpp 
    7777</pre></div> on Windows.<p> 
    78 Example of a mexfile: <div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;itpp/itmex.h&gt;</span> 
    79 <span class="preprocessor">#include &lt;<a class="code" href="arx_8h.html" title="Bayesian Filtering for generalized autoregressive (ARX) model.">estim/arx.h</a>&gt;</span> 
    80  
    81 <span class="keyword">using namespace </span>bdm; 
    82  
    83 <span class="keywordtype">void</span> mexFunction(<span class="keywordtype">int</span> n_output, mxArray *output[], <span class="keywordtype">int</span> n_input, <span class="keyword">const</span> mxArray *input[]) 
    84 { 
    85     <span class="comment">// Check the number of inputs and output arguments</span> 
    86         <span class="keywordflow">if</span>(n_output!=1) mexErrMsgTxt(<span class="stringliteral">"Wrong number of output variables!"</span>); 
    87         <span class="keywordflow">if</span>(n_input!=2) mexErrMsgTxt(<span class="stringliteral">"Usage: arx1d(ysize, Data)!"</span>); 
    88  
    89     <span class="comment">// Convert input variables to IT++ format</span> 
    90         <span class="keywordtype">int</span> ysize = mxArray2int(input[0]); 
    91         mat Data = mxArray2mat(input[1]); 
    92  
    93     <span class="comment">// ------------------ Start of routine ---------------------------</span> 
    94         ARX Ar; 
    95         Ar.set_statistics(ysize, 1e-5*eye(Data.rows()) ); 
    96         Ar.bayesB(Data); 
    97         <span class="comment">// ------------------ End of routine -----------------------------</span> 
    98  
    99     <span class="comment">// Create output vectors</span> 
    100         output[0] = mxCreateDoubleMatrix(1,Data.rows(), mxREAL); 
    101  
    102     <span class="comment">// Convert the IT++ format to Matlab format for output</span> 
    103         vec2mxArray(Ar.posterior().mean(), output[0]); 
    104 } 
    105 </pre></div> </div> 
    106 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 14:13:28 2009 for mixpp by&nbsp; 
     78Example of a mexfile: <div class="fragment"><pre class="fragment"></pre></div> </div> 
     79<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 24 13:35:47 2009 for mixpp by&nbsp; 
    10780<a href="http://www.doxygen.org/index.html"> 
    108 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> 
     81<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 
    10982</body> 
    11083</html>