dynare/matlab/doc/gcompare.html

94 lines
4.5 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 gcompare</title>
<meta name="keywords" content="gcompare">
<meta name="description" content="Copyright (C) 2001 Michel Juillard">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html &copy; 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> &gt; <a href="index.html">.</a> &gt; gcompare.m</div>
<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for .&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
<h1>gcompare
</h1>
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Copyright (C) 2001 Michel Juillard</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 gcompare(s1,s2) </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"> Copyright (C) 2001 Michel Juillard
GCOMPARE : GCOMPARE ( [ 'file1' ; 'file2' ] , [ 'var1' ; 'var2' ...] )
This optional command plots the trajectories of a list of
variables in two different simulations. One plot is drawn
for each variable. The trajectories must have been previously
saved by the instruction DYNASAVE. The simulation in file1
is refered to as the base simulation.</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="ftest.html" class="code" title="function ftest (s1,s2)">ftest</a> Copyright (C) 2001 Michel Juillard</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</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">% Copyright (C) 2001 Michel Juillard</span>
0002 <span class="comment">%</span>
0003 <a name="_sub0" href="#_subfunctions" class="code">function gcompare(s1,s2)</a>
0004 <span class="comment">% GCOMPARE : GCOMPARE ( [ 'file1' ; 'file2' ] , [ 'var1' ; 'var2' ...] )</span>
0005 <span class="comment">% This optional command plots the trajectories of a list of</span>
0006 <span class="comment">% variables in two different simulations. One plot is drawn</span>
0007 <span class="comment">% for each variable. The trajectories must have been previously</span>
0008 <span class="comment">% saved by the instruction DYNASAVE. The simulation in file1</span>
0009 <span class="comment">% is refered to as the base simulation.</span>
0010
0011
0012 <span class="keyword">global</span> options_ M_
0013 <span class="keyword">global</span> nvx nvy x y lag1
0014
0015 <a href="ftest.html" class="code" title="function ftest (s1,s2)">ftest</a>(s1,s2) ;
0016
0017 ix = [1-lag1(1):size(x,2)-lag1(1)]' ;
0018 i = [lag1(1):size(ix,1)-lag1(2)+1]' ;
0019
0020 <span class="keyword">if</span> options_.smpl == 0
0021 i = [M_.maximum_lag:size(y,2)]' ;
0022 <span class="keyword">else</span>
0023 i = [options_.smpl(1):options_.smpl(2)]' ;
0024 <span class="keyword">end</span>
0025
0026 <span class="keyword">for</span> k = 1:size(x,1)
0027 figure ;
0028 plot (ix(i),x(k,i),ix(i),y(k,i)) ;
0029 xlabel ([<span class="string">'Periods'</span>]) ;
0030 title ([<span class="string">'Variable '</span> s2(k,:)]) ;
0031 l = min(i) + 1;
0032 ll = max(i) - 1 ;
0033 text (l,x(k,l),s1(1,:)) ;
0034 text (ll,y(k,ll),s1(2,:)) ;
0035 <span class="keyword">end</span>
0036
0037 <span class="comment">% 06/18/01 MJ corrected treatment of options_.smpl</span>
0038 <span class="comment">% 06/24/01 MJ removed color specification</span>
0039
0040
0041</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> &copy; 2003</address>
</body>
</html>