0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 1 <p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 2 <a href="m/sigproc/time_domain/ltpda_timedomainfit.html">ltpda_timedomainfit.m</a> uses the MATLAB function <tt>lscov.m</tt> to fit a set of time-series AOs to a target time-series AO. It gives back a set of fitting coefficients.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 3 </p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 4 <p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 5 One can now subtract the fitted time series from the original one - the target- and produce a new time series by calling
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 6 <a href="m/math/ltpda_lincom.html">ltpda_lincom.m</a> with the calculated coefficients. This function does a linear combination of the inputted coefficients and analysis objects and subtracts the result from the target analysis object, which has to be the first input parameter.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 7 </p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 8 <h2><a name="example">An example:</a></h2>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 9 <div class="fragment"><pre>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 10 coeffsAO = ltpda_timedomainfit(target, ts1, ts2, ts3, ts4);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 11
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 12 %% Make linear combination
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 13
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 14 x12ns = ltpda_lincom(target, ts1, ts2, ts3, ts4, coeffsAO);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 15 </pre></div>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 16
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 17 <p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 18 <tt>x12ns</tt> represents the noise subtracted target analysis object. With noise here the fitted time series is meant. That is the linear combination of the coefficients <tt>coeffsAO</tt> and the time series objects ts1 to ts4.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 19 </p>
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 20
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 21 The number of time or frequency series analysis objects is variable. </br> The first is always taken as target object.