93 lines
4.5 KiB
HTML
93 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 dsample</title>
|
||
|
<meta name="keywords" content="dsample">
|
||
|
<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 © 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> > dsample.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>dsample
|
||
|
</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 dsample(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
|
||
|
|
||
|
DSAMPLE : DSAMPLE(d1,d2)
|
||
|
This optional command permits to reduce the number of
|
||
|
periods considered in following output commands.
|
||
|
If only one argument is
|
||
|
provided, output is from period 1 to the period
|
||
|
specified in the DSAMPLE command. If two arguments are
|
||
|
present output is done for the interval between the
|
||
|
two periods.
|
||
|
DSAMPLE without arguments reset the sample to the one
|
||
|
specified by PERIODS</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)">
|
||
|
</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 dsample(s1,s2)</a>
|
||
|
0004 <span class="comment">% DSAMPLE : DSAMPLE(d1,d2)</span>
|
||
|
0005 <span class="comment">% This optional command permits to reduce the number of</span>
|
||
|
0006 <span class="comment">% periods considered in following output commands.</span>
|
||
|
0007 <span class="comment">% If only one argument is</span>
|
||
|
0008 <span class="comment">% provided, output is from period 1 to the period</span>
|
||
|
0009 <span class="comment">% specified in the DSAMPLE command. If two arguments are</span>
|
||
|
0010 <span class="comment">% present output is done for the interval between the</span>
|
||
|
0011 <span class="comment">% two periods.</span>
|
||
|
0012 <span class="comment">% DSAMPLE without arguments reset the sample to the one</span>
|
||
|
0013 <span class="comment">% specified by PERIODS</span>
|
||
|
0014
|
||
|
0015 <span class="keyword">global</span> options_
|
||
|
0016
|
||
|
0017 options_.smpl = zeros(2,1) ;
|
||
|
0018
|
||
|
0019 <span class="keyword">if</span> s1 > options_.periods | s2 > options_.periods
|
||
|
0020 t = [<span class="string">'DYNARE dsample error: one of the arguments is larger than the one'</span> <span class="keyword">...</span>
|
||
|
0021 <span class="string">' specified in PERIODS'</span>];
|
||
|
0022 error(t);
|
||
|
0023 <span class="keyword">end</span>
|
||
|
0024
|
||
|
0025 <span class="keyword">if</span> nargin == 0
|
||
|
0026 options_.smpl(1) = 1 ;
|
||
|
0027 options_.smpl(2) = options_.periods ;
|
||
|
0028 <span class="keyword">elseif</span> nargin == 1
|
||
|
0029 options_.smpl(1) = 1 ;
|
||
|
0030 options_.smpl(2) = s1 ;
|
||
|
0031 <span class="keyword">else</span>
|
||
|
0032 options_.smpl(1) = s1 ;
|
||
|
0033 options_.smpl(2) = s2 ;
|
||
|
0034 <span class="keyword">end</span>
|
||
|
0035
|
||
|
0036 <span class="comment">% 02/23/01 MJ added error checking</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>
|