93 lines
4.7 KiB
HTML
93 lines
4.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Description of calib_obj2</title>
|
|
<meta name="keywords" content="calib_obj2">
|
|
<meta name="description" content="targets and iy order: 1) variances 2) correlations">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="generator" content="m2html © 2003 Guillaume Flandin">
|
|
<meta name="robots" content="index, follow">
|
|
<link type="text/css" rel="stylesheet" href="../m2html.css">
|
|
</head>
|
|
<body>
|
|
<a name="_top"></a>
|
|
<div><a href="../index.html">Home</a> > <a href="index.html">.</a> > calib_obj2.m</div>
|
|
|
|
<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td>
|
|
<td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
|
|
|
|
<h1>calib_obj2
|
|
</h1>
|
|
|
|
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>targets and iy order: 1) variances 2) correlations</strong></div>
|
|
|
|
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>function objective=calib_obj2(M_.Sigma_e,A,ghu1,ghx,ghu,targets,var_weights,iy,nar) </strong></div>
|
|
|
|
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre class="comment"> targets and iy order: 1) variances 2) correlations
|
|
3) constraints on M_.Sigma_e itself 4) autocorrelations</pre></div>
|
|
|
|
<!-- crossreference -->
|
|
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
This function calls:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
<li><a href="lyapunov_symm.html" class="code" title="function [x,ns_var]=lyapunov_symm(a,b)">lyapunov_symm</a> solves x-a*x*a'=b for b (and then x) symmetrical</li></ul>
|
|
This function is called by:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
<li><a href="calib.html" class="code" title="function M_.Sigma_e = calib(var_indices,targets,var_weights,nar,cova,M_.Sigma_e)">calib</a> </li></ul>
|
|
<!-- crossreference -->
|
|
|
|
|
|
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre>0001 <span class="comment">% targets and iy order: 1) variances 2) correlations</span>
|
|
0002 <span class="comment">% 3) constraints on M_.Sigma_e itself 4) autocorrelations</span>
|
|
0003 <a name="_sub0" href="#_subfunctions" class="code">function objective=calib_obj2(M_.Sigma_e,A,ghu1,ghx,ghu,targets,var_weights,iy,nar)</a>
|
|
0004 <span class="keyword">global</span> vx fold
|
|
0005
|
|
0006 objective = cell (nar+3);
|
|
0007 oo_.gamma_y = cell(nar+1,1);
|
|
0008 M_.Sigma_e=diag(M_.Sigma_e);
|
|
0009 nx = size(ghx,2);
|
|
0010 b=ghu1*M_.Sigma_e*ghu1';
|
|
0011 vx = <a href="lyapunov_symm.html" class="code" title="function [x,ns_var]=lyapunov_symm(a,b)">lyapunov_symm</a>(A,b);
|
|
0012 oo_.gamma_y{1} = ghx*vx*ghx'+ ghu*M_.Sigma_e*ghu';
|
|
0013 <span class="keyword">if</span> ~isempty(targets{1})
|
|
0014 objective{1} = sqrt(oo_.gamma_y{1}(iy{1}));
|
|
0015 <span class="keyword">end</span>
|
|
0016
|
|
0017 sy = sqrt(diag(oo_.gamma_y{1}));
|
|
0018 sy = sy *sy';
|
|
0019 <span class="keyword">if</span> ~isempty(targets{2})
|
|
0020 objective{2} = oo_.gamma_y{1}(iy{2})./(sy(iy{2})+1e-10);
|
|
0021 <span class="keyword">end</span>
|
|
0022
|
|
0023 <span class="keyword">if</span> ~isempty(targets{3})
|
|
0024 objective{3} = M_.Sigma_e(iy{3});
|
|
0025 <span class="keyword">end</span>
|
|
0026
|
|
0027 <span class="comment">% autocorrelations</span>
|
|
0028 <span class="keyword">if</span> nar > 0
|
|
0029 vxy = (A*vx*ghx'+ghu1*M_.Sigma_e*ghu');
|
|
0030
|
|
0031 oo_.gamma_y{2} = ghx*vxy./(sy+1e-10);
|
|
0032 <span class="keyword">if</span> ~isempty(targets{4})
|
|
0033 objective{4} = oo_.gamma_y{2}(iy{4});
|
|
0034 <span class="keyword">end</span>
|
|
0035
|
|
0036 <span class="keyword">for</span> i=2:nar
|
|
0037 vxy = A*vxy;
|
|
0038 oo_.gamma_y{i+1} = ghx*vxy./(sy+1e-10);
|
|
0039 <span class="keyword">if</span> ~isempty(targets{i+3})
|
|
0040 objecitve{i+3} = oo_.gamma_y{i+1}(iy{i+3});
|
|
0041 <span class="keyword">end</span>
|
|
0042 <span class="keyword">end</span>
|
|
0043 <span class="keyword">end</span>
|
|
0044
|
|
0045 <span class="comment">% 11/04/02 MJ generalized for correlations, autocorrelations and</span>
|
|
0046 <span class="comment">% constraints on M_.Sigma_e</span></pre></div>
|
|
<hr><address>Generated on Fri 16-Jun-2006 09:09:06 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address>
|
|
</body>
|
|
</html> |