<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="matlab_2mex_2arx__c_8cpp" kind="file">
    <compoundname>arx_c.cpp</compoundname>
    <includes refid="arx_8h" local="yes">../../bdm/estim/arx.h</includes>
    <incdepgraph>
      <node id="477">
        <label>../stat/libFN.h</label>
        <link refid="libFN_8h-source"/>
        <childnode refid="476" relation="include">
        </childnode>
        <childnode refid="478" relation="include">
        </childnode>
      </node>
      <node id="475">
        <label>../../bdm/estim/arx.h</label>
        <link refid="arx_8h"/>
        <childnode refid="476" relation="include">
        </childnode>
        <childnode refid="477" relation="include">
        </childnode>
        <childnode refid="479" relation="include">
        </childnode>
      </node>
      <node id="478">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="476" relation="include">
        </childnode>
      </node>
      <node id="474">
        <label>work/mixpp/matlab/mex/arx_c.cpp</label>
        <link refid="matlab/mex/arx_c.cpp"/>
        <childnode refid="475" relation="include">
        </childnode>
      </node>
      <node id="480">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="476" relation="include">
        </childnode>
      </node>
      <node id="476">
        <label>itpp/itbase.h</label>
      </node>
      <node id="481">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="476" relation="include">
        </childnode>
      </node>
      <node id="479">
        <label>../stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="476" relation="include">
        </childnode>
        <childnode refid="480" relation="include">
        </childnode>
        <childnode refid="478" relation="include">
        </childnode>
        <childnode refid="481" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="matlab_2mex_2arx__c_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>()</argsstring>
        <name>main</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/mixpp/matlab/mex/arx_c.cpp" line="5" bodyfile="/home/smidl/work/mixpp/matlab/mex/arx_c.cpp" bodystart="5" bodyend="33"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;../../bdm/estim/arx.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>()<sp/>{</highlight></codeline>
<codeline lineno="6"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_file<sp/>itf(</highlight><highlight class="stringliteral">&quot;DD&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>input<sp/>variables<sp/>to<sp/>IT++<sp/>format</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Data;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>itf<sp/>&gt;&gt;<sp/>Name(</highlight><highlight class="stringliteral">&quot;DD&quot;</highlight><highlight class="normal">)<sp/>&gt;&gt;<sp/>Data;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>Start<sp/>of<sp/>routine<sp/>---------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ndat=Data.cols();</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npsi=Data.rows();</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>thr<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{<sp/>theta_r<sp/>}&quot;</highlight><highlight class="normal">,vec_1<sp/>(<sp/>npsi<sp/>),vec_1<sp/>(<sp/>0<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0=1e-8*eye<sp/>(<sp/>npsi<sp/>);<sp/></highlight><highlight class="comment">//V0<sp/>(<sp/>0,0<sp/>)<sp/>*=1.0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>nu0=3;</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX" kindref="compound" tooltip="Linear Autoregressive model with Gaussian noise.">ARX</ref><sp/>Ar<sp/>(<sp/>thr,V0,nu0<sp/>);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>estimate</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=0;i&lt;ndat;i++<sp/>)<sp/>{Ar.bayes<sp/>(<sp/>Data.get_col<sp/>(<sp/>i<sp/>)<sp/>);<sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>th<sp/>=<sp/>Ar._epdf().mean();</highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>End<sp/>of<sp/>routine<sp/>-----------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>th<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ll=Ar._ll();</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>ll<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/>str<sp/>=<sp/>Ar.structure_est<sp/>(<sp/><ref refid="classegiw" kindref="compound" tooltip="Gauss-inverse-Wishart density stored in LD form.">egiw</ref><sp/>(<sp/>thr,V0,nu0<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>str<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="33"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/mixpp/matlab/mex/arx_c.cpp"/>
  </compounddef>
</doxygen>
