1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="linefit_8cpp" kind="file"> |
---|
4 | <compoundname>linefit.cpp</compoundname> |
---|
5 | <includes local="no">itpp/itmex.h</includes> |
---|
6 | <includes refid="arx_8h" local="yes">../../bdm/estim/arx.h</includes> |
---|
7 | <incdepgraph> |
---|
8 | <node id="520"> |
---|
9 | <label>libBM.h</label> |
---|
10 | <link refid="libBM_8h"/> |
---|
11 | <childnode refid="518" relation="include"> |
---|
12 | </childnode> |
---|
13 | </node> |
---|
14 | <node id="516"> |
---|
15 | <label>itpp/itmex.h</label> |
---|
16 | </node> |
---|
17 | <node id="515"> |
---|
18 | <label>work/git/mixpp/matlab/mex/linefit.cpp</label> |
---|
19 | <link refid="linefit.cpp"/> |
---|
20 | <childnode refid="516" relation="include"> |
---|
21 | </childnode> |
---|
22 | <childnode refid="517" relation="include"> |
---|
23 | </childnode> |
---|
24 | </node> |
---|
25 | <node id="523"> |
---|
26 | <label>../itpp_ext.h</label> |
---|
27 | <link refid="itpp__ext_8h-source"/> |
---|
28 | <childnode refid="518" relation="include"> |
---|
29 | </childnode> |
---|
30 | </node> |
---|
31 | <node id="521"> |
---|
32 | <label>../stat/libEF.h</label> |
---|
33 | <link refid="libEF_8h"/> |
---|
34 | <childnode refid="518" relation="include"> |
---|
35 | </childnode> |
---|
36 | <childnode refid="522" relation="include"> |
---|
37 | </childnode> |
---|
38 | <childnode refid="520" relation="include"> |
---|
39 | </childnode> |
---|
40 | <childnode refid="523" relation="include"> |
---|
41 | </childnode> |
---|
42 | </node> |
---|
43 | <node id="517"> |
---|
44 | <label>../../bdm/estim/arx.h</label> |
---|
45 | <link refid="arx_8h"/> |
---|
46 | <childnode refid="518" relation="include"> |
---|
47 | </childnode> |
---|
48 | <childnode refid="519" relation="include"> |
---|
49 | </childnode> |
---|
50 | <childnode refid="521" relation="include"> |
---|
51 | </childnode> |
---|
52 | </node> |
---|
53 | <node id="519"> |
---|
54 | <label>../stat/libFN.h</label> |
---|
55 | <link refid="libFN_8h-source"/> |
---|
56 | <childnode refid="518" relation="include"> |
---|
57 | </childnode> |
---|
58 | <childnode refid="520" relation="include"> |
---|
59 | </childnode> |
---|
60 | </node> |
---|
61 | <node id="518"> |
---|
62 | <label>itpp/itbase.h</label> |
---|
63 | </node> |
---|
64 | <node id="522"> |
---|
65 | <label>../math/libDC.h</label> |
---|
66 | <link refid="libDC_8h"/> |
---|
67 | <childnode refid="518" relation="include"> |
---|
68 | </childnode> |
---|
69 | </node> |
---|
70 | </incdepgraph> |
---|
71 | <sectiondef kind="func"> |
---|
72 | <memberdef kind="function" id="linefit_8cpp_182033299688d607730e08333ff7471f8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
73 | <type>void</type> |
---|
74 | <definition>void mexFunction</definition> |
---|
75 | <argsstring>(int n_output, mxArray *output[], int n_input, const mxArray *input[])</argsstring> |
---|
76 | <name>mexFunction</name> |
---|
77 | <param> |
---|
78 | <type>int</type> |
---|
79 | <declname>n_output</declname> |
---|
80 | </param> |
---|
81 | <param> |
---|
82 | <type>mxArray *</type> |
---|
83 | <declname>output</declname> |
---|
84 | <array>[]</array> |
---|
85 | </param> |
---|
86 | <param> |
---|
87 | <type>int</type> |
---|
88 | <declname>n_input</declname> |
---|
89 | </param> |
---|
90 | <param> |
---|
91 | <type>const mxArray *</type> |
---|
92 | <declname>input</declname> |
---|
93 | <array>[]</array> |
---|
94 | </param> |
---|
95 | <briefdescription> |
---|
96 | </briefdescription> |
---|
97 | <detaileddescription> |
---|
98 | </detaileddescription> |
---|
99 | <inbodydescription> |
---|
100 | </inbodydescription> |
---|
101 | <location file="/home/smidl/work/git/mixpp/matlab/mex/linefit.cpp" line="7" bodyfile="/home/smidl/work/git/mixpp/matlab/mex/linefit.cpp" bodystart="7" bodyend="74"/> |
---|
102 | </memberdef> |
---|
103 | </sectiondef> |
---|
104 | <briefdescription> |
---|
105 | </briefdescription> |
---|
106 | <detaileddescription> |
---|
107 | </detaileddescription> |
---|
108 | <programlisting> |
---|
109 | <codeline lineno="1"><highlight class="preprocessor">#include<sp/><itpp/itmex.h></highlight><highlight class="normal"></highlight></codeline> |
---|
110 | <codeline lineno="2"><highlight class="normal"></highlight></codeline> |
---|
111 | <codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"../../bdm/estim/arx.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
112 | <codeline lineno="4"><highlight class="normal"></highlight></codeline> |
---|
113 | <codeline lineno="5"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline> |
---|
114 | <codeline lineno="6"><highlight class="normal"></highlight></codeline> |
---|
115 | <codeline lineno="7"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mexFunction<sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n_output,<sp/>mxArray<sp/>*output[],<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n_input,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mxArray<sp/>*input[]<sp/>)<sp/>{</highlight></codeline> |
---|
116 | <codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>the<sp/>number<sp/>of<sp/>inputs<sp/>and<sp/>output<sp/>arguments</highlight><highlight class="normal"></highlight></codeline> |
---|
117 | <codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_output<1<sp/>)<sp/>mexErrMsgTxt<sp/>(<sp/></highlight><highlight class="stringliteral">"Wrong<sp/>number<sp/>of<sp/>output<sp/>variables!"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
118 | <codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_input!=3<sp/>)<sp/>mexErrMsgTxt<sp/>(<sp/></highlight><highlight class="stringliteral">"Wrong<sp/>number<sp/>of<sp/>input<sp/>variables!"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
119 | <codeline lineno="11"><highlight class="normal"></highlight></codeline> |
---|
120 | <codeline lineno="12"><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> |
---|
121 | <codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Data<sp/>=<sp/>mxArray2mat<sp/>(<sp/>input[0]<sp/>);</highlight></codeline> |
---|
122 | <codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Data.rows()!=2)</highlight></codeline> |
---|
123 | <codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{<sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Data.cols()==2)<sp/>Data=Data.T();<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>mexErrMsgTxt(</highlight><highlight class="stringliteral">"Data<sp/>are<sp/>not<sp/>2D!"</highlight><highlight class="normal">);}</highlight></codeline> |
---|
124 | <codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ilow<sp/>=<sp/>mxArray2int<sp/>(<sp/>input[1]<sp/>);</highlight></codeline> |
---|
125 | <codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ihi<sp/>=<sp/>mxArray2int<sp/>(<sp/>input[2]<sp/>);</highlight></codeline> |
---|
126 | <codeline lineno="18"><highlight class="normal"></highlight></codeline> |
---|
127 | <codeline lineno="19"><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> |
---|
128 | <codeline lineno="20"><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> |
---|
129 | <codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npsi=Data.rows()+1;<sp/></highlight><highlight class="comment">//add<sp/>a<sp/>constant</highlight><highlight class="normal"></highlight></codeline> |
---|
130 | <codeline lineno="22"><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">"1"</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">"{<sp/>theta_r<sp/>}"</highlight><highlight class="normal">,vec_1<sp/>(<sp/>npsi<sp/>),vec_1<sp/>(<sp/>0<sp/>)<sp/>);</highlight></codeline> |
---|
131 | <codeline lineno="23"><highlight class="normal"></highlight></codeline> |
---|
132 | <codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0=1e-8*eye<sp/>(<sp/>npsi<sp/>);<sp/>V0<sp/>(<sp/>0,0<sp/>)<sp/>=10.0;</highlight></codeline> |
---|
133 | <codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>rgr(npsi);</highlight></codeline> |
---|
134 | <codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>nu0=npsi+2;</highlight></codeline> |
---|
135 | <codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>fitting<sp/>a<sp/>linear<sp/>part<sp/>=><sp/>third<sp/>coef<sp/>is<sp/>"1"</highlight><highlight class="normal"></highlight></codeline> |
---|
136 | <codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgr(2)<sp/>=<sp/>1.0;</highlight></codeline> |
---|
137 | <codeline lineno="29"><highlight class="normal"></highlight></codeline> |
---|
138 | <codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>AR<sp/>model</highlight><highlight class="normal"></highlight></codeline> |
---|
139 | <codeline lineno="31"><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> |
---|
140 | <codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>start<sp/>at<sp/>i0</highlight><highlight class="normal"></highlight></codeline> |
---|
141 | <codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>gohi=</highlight><highlight class="keyword">true</highlight><highlight class="normal">;<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>golow=</highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline> |
---|
142 | <codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>certain<sp/>period<sp/></highlight><highlight class="normal"></highlight></codeline> |
---|
143 | <codeline lineno="35"><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=ilow;i<ihi;i++){</highlight></codeline> |
---|
144 | <codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgr.set_subvector(0,Data.get_col<sp/>(<sp/>i<sp/>));</highlight></codeline> |
---|
145 | <codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ar.bayes<sp/>(<sp/>rgr<sp/>);</highlight></codeline> |
---|
146 | <codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
147 | <codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>tll=Ar._tll();</highlight></codeline> |
---|
148 | <codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>go<sp/>hi</highlight><highlight class="normal"></highlight></codeline> |
---|
149 | <codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline> |
---|
150 | <codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgr.set_subvector(0,Data.get_col<sp/>(<sp/>++ihi<sp/>));</highlight></codeline> |
---|
151 | <codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ar.bayes<sp/>(rgr);</highlight></codeline> |
---|
152 | <codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Ar._tll()>tll)<sp/>tll=Ar._tll();</highlight></codeline> |
---|
153 | <codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>gohi=</highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
---|
154 | <codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(gohi);</highlight></codeline> |
---|
155 | <codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>go<sp/>low</highlight><highlight class="normal"></highlight></codeline> |
---|
156 | <codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{<sp/></highlight></codeline> |
---|
157 | <codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgr.set_subvector(0,Data.get_col<sp/>(<sp/>--ilow<sp/>));</highlight></codeline> |
---|
158 | <codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Ar.bayes<sp/>(rgr);</highlight></codeline> |
---|
159 | <codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Ar._tll()>tll)<sp/>tll=Ar._tll();</highlight></codeline> |
---|
160 | <codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>golow=</highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
---|
161 | <codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(golow);</highlight></codeline> |
---|
162 | <codeline lineno="54"><highlight class="normal"></highlight></codeline> |
---|
163 | <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>th<sp/>=<sp/>Ar._epdf().mean();</highlight></codeline> |
---|
164 | <codeline lineno="56"><highlight class="normal"></highlight></codeline> |
---|
165 | <codeline lineno="57"><highlight class="normal"></highlight></codeline> |
---|
166 | <codeline lineno="58"><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> |
---|
167 | <codeline lineno="59"><highlight class="normal"></highlight></codeline> |
---|
168 | <codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>output<sp/>vectors</highlight><highlight class="normal"></highlight></codeline> |
---|
169 | <codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output[0]<sp/>=<sp/>mxCreateDoubleMatrix<sp/>(<sp/>1,th.length(),<sp/>mxREAL<sp/>);</highlight></codeline> |
---|
170 | <codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>the<sp/>IT++<sp/>format<sp/>to<sp/>Matlab<sp/>format<sp/>for<sp/>output</highlight><highlight class="normal"></highlight></codeline> |
---|
171 | <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec2mxArray<sp/>(<sp/>th,<sp/>output[0]<sp/>);</highlight></codeline> |
---|
172 | <codeline lineno="64"><highlight class="normal"></highlight></codeline> |
---|
173 | <codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_output>1<sp/>)<sp/>{</highlight></codeline> |
---|
174 | <codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output[1]<sp/>=<sp/>mxCreateDoubleMatrix<sp/>(<sp/>1,1,<sp/>mxREAL<sp/>);</highlight></codeline> |
---|
175 | <codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>double2mxArray<sp/>(<sp/>ilow,<sp/>output[1]<sp/>);</highlight></codeline> |
---|
176 | <codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
177 | <codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_output>1<sp/>)<sp/>{</highlight></codeline> |
---|
178 | <codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output[2]<sp/>=<sp/>mxCreateDoubleMatrix<sp/>(<sp/>1,1,<sp/>mxREAL<sp/>);</highlight></codeline> |
---|
179 | <codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>double2mxArray<sp/>(<sp/>ihi,<sp/>output[2]<sp/>);</highlight></codeline> |
---|
180 | <codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
181 | <codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
182 | <codeline lineno="74"><highlight class="normal">}</highlight></codeline> |
---|
183 | </programlisting> |
---|
184 | <location file="/home/smidl/work/git/mixpp/matlab/mex/linefit.cpp"/> |
---|
185 | </compounddef> |
---|
186 | </doxygen> |
---|