185 lines
12 KiB
HTML
185 lines
12 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 plot_priors</title>
|
||
|
<meta name="keywords" content="plot_priors">
|
||
|
<meta name="description" content="stephane.adjemian@cepremap.cnrs.fr [07-31-2004]">
|
||
|
<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> > plot_priors.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>plot_priors
|
||
|
</h1>
|
||
|
|
||
|
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
||
|
<div class="box"><strong>stephane.adjemian@cepremap.cnrs.fr [07-31-2004]</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 plot_priors </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"> stephane.adjemian@cepremap.cnrs.fr [07-31-2004]</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="draw_prior_density.html" class="code" title="function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);">draw_prior_density</a> stephane.adjemian@ens.fr [07-15-2004]</li><li><a href="get_the_name.html" class="code" title="function [nam,texnam] = get_the_name(k,TeX)">get_the_name</a> stephane.adjemian@cepremap.cnrs.fr [07-13-2004]</li><li><a href="pltorg.html" class="code" title="function [nbplt,nr,nc,lr,lc,nstar] = pltorg(number)">pltorg</a> stephane.adjemian@cepremap.cnrs.fr [06-07-2004]</li></ul>
|
||
|
This function is called by:
|
||
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
||
|
<li><a href="dynare_estimation.html" class="code" title="function dynare_estimation(var_list_)">dynare_estimation</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 <a name="_sub0" href="#_subfunctions" class="code">function plot_priors</a>
|
||
|
0002 <span class="comment">% stephane.adjemian@cepremap.cnrs.fr [07-31-2004]</span>
|
||
|
0003 <span class="keyword">global</span> bayestopt_ M_ options_
|
||
|
0004
|
||
|
0005 TeX = options_.TeX;
|
||
|
0006
|
||
|
0007 figurename = <span class="string">'Priors'</span>;
|
||
|
0008 npar = length(bayestopt_.pmean);
|
||
|
0009 [nbplt,nr,nc,lr,lc,nstar] = <a href="pltorg.html" class="code" title="function [nbplt,nr,nc,lr,lc,nstar] = pltorg(number)">pltorg</a>(npar);
|
||
|
0010
|
||
|
0011 <span class="keyword">if</span> TeX
|
||
|
0012 fidTeX = fopen([M_.fname <span class="string">'_Priors.TeX'</span>],<span class="string">'w'</span>);
|
||
|
0013 fprintf(fidTeX,<span class="string">'%% TeX eps-loader file generated by plot_priors.m (Dynare).\n'</span>);
|
||
|
0014 fprintf(fidTeX,[<span class="string">'%% '</span> datestr(now,0) <span class="string">'\n'</span>]);
|
||
|
0015 fprintf(fidTeX,<span class="string">' \n'</span>);
|
||
|
0016 <span class="keyword">end</span>
|
||
|
0017 <span class="keyword">if</span> nbplt == 1
|
||
|
0018 h1 = figure(<span class="string">'Name'</span>,figurename);
|
||
|
0019 <span class="keyword">if</span> TeX
|
||
|
0020 TeXNAMES = [];
|
||
|
0021 NAMES = [];
|
||
|
0022 <span class="keyword">end</span>
|
||
|
0023 <span class="keyword">for</span> i=1:npar
|
||
|
0024 [x,f,abscissa,dens,binf,bsup] = <a href="draw_prior_density.html" class="code" title="function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);">draw_prior_density</a>(i);
|
||
|
0025 [nam,texnam] = <a href="get_the_name.html" class="code" title="function [nam,texnam] = get_the_name(k,TeX)">get_the_name</a>(i,TeX);
|
||
|
0026 <span class="keyword">if</span> TeX
|
||
|
0027 TeXNAMES = strvcat(TeXNAMES,texnam);
|
||
|
0028 NAMES = strvcat(NAMES,nam);
|
||
|
0029 <span class="keyword">end</span>
|
||
|
0030 subplot(nr,nc,i)
|
||
|
0031 hh = plot(x,f,<span class="string">'-k'</span>,<span class="string">'linewidth'</span>,2);
|
||
|
0032 set(hh,<span class="string">'color'</span>,[0.7 0.7 0.7]);
|
||
|
0033 box on
|
||
|
0034 title(nam,<span class="string">'Interpreter'</span>,<span class="string">'none'</span>)
|
||
|
0035 drawnow
|
||
|
0036 <span class="keyword">end</span>
|
||
|
0037 eval([<span class="string">'print -depsc2 '</span> M_.fname <span class="string">'_Priors'</span> int2str(1)]);
|
||
|
0038 eval([<span class="string">'print -dpdf '</span> M_.fname <span class="string">'_Priors'</span> int2str(1)]);
|
||
|
0039 saveas(h1,[M_.fname <span class="string">'_Priors'</span> int2str(1) <span class="string">'.fig'</span>]);
|
||
|
0040 <span class="keyword">if</span> options_.nograph, close(h1), <span class="keyword">end</span>
|
||
|
0041 <span class="keyword">if</span> TeX
|
||
|
0042 fprintf(fidTeX,<span class="string">'\\begin{figure}[H]\n'</span>);
|
||
|
0043 <span class="keyword">for</span> jj = 1:npar
|
||
|
0044 fprintf(fidTeX,<span class="string">'\\psfrag{%s}[1][][0.5][0]{%s}\n'</span>,deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
|
||
|
0045 <span class="keyword">end</span>
|
||
|
0046 fprintf(fidTeX,<span class="string">'\\centering\n'</span>);
|
||
|
0047 fprintf(fidTeX,<span class="string">'\\includegraphics[scale=0.5]{%s_Priors%s}\n'</span>,M_.fname,int2str(1));
|
||
|
0048 fprintf(fidTeX,<span class="string">'\\caption{Priors.}'</span>);
|
||
|
0049 fprintf(fidTeX,<span class="string">'\\label{Fig:Priors:%s}\n'</span>,int2str(1));
|
||
|
0050 fprintf(fidTeX,<span class="string">'\\end{figure}\n'</span>);
|
||
|
0051 fprintf(fidTeX,<span class="string">' \n'</span>);
|
||
|
0052 fprintf(fidTeX,<span class="string">'%% End of TeX file.\n'</span>);
|
||
|
0053 fclose(fidTeX);
|
||
|
0054 <span class="keyword">end</span>
|
||
|
0055 <span class="keyword">else</span>
|
||
|
0056 <span class="keyword">for</span> plt = 1:nbplt-1
|
||
|
0057 hplt = figure(<span class="string">'Name'</span>,figurename);
|
||
|
0058 <span class="keyword">if</span> TeX
|
||
|
0059 TeXNAMES = [];
|
||
|
0060 NAMES = [];
|
||
|
0061 <span class="keyword">end</span>
|
||
|
0062 <span class="keyword">for</span> index=1:nstar
|
||
|
0063 names = [];
|
||
|
0064 i = (plt-1)*nstar + index;
|
||
|
0065 [nam,texnam] = <a href="get_the_name.html" class="code" title="function [nam,texnam] = get_the_name(k,TeX)">get_the_name</a>(i,TeX);
|
||
|
0066 [x,f,abscissa,dens,binf,bsup] = <a href="draw_prior_density.html" class="code" title="function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);">draw_prior_density</a>(i);
|
||
|
0067 <span class="keyword">if</span> TeX
|
||
|
0068 TeXNAMES = strvcat(TeXNAMES,texnam);
|
||
|
0069 NAMES = strvcat(NAMES,nam);
|
||
|
0070 <span class="keyword">end</span>
|
||
|
0071 subplot(nr,nc,index)
|
||
|
0072 hh = plot(x,f,<span class="string">'-k'</span>,<span class="string">'linewidth'</span>,2);
|
||
|
0073 set(hh,<span class="string">'color'</span>,[0.7 0.7 0.7]);
|
||
|
0074 box on
|
||
|
0075 title(nam,<span class="string">'Interpreter'</span>,<span class="string">'none'</span>)
|
||
|
0076 drawnow
|
||
|
0077 <span class="keyword">end</span> <span class="comment">% index=1:nstar</span>
|
||
|
0078 eval([<span class="string">'print -depsc2 '</span> M_.fname <span class="string">'_Priors'</span> int2str(plt)]);
|
||
|
0079 eval([<span class="string">'print -dpdf '</span> M_.fname <span class="string">'_Priors'</span> int2str(plt)]);
|
||
|
0080 saveas(hplt,[M_.fname <span class="string">'_Priors'</span> int2str(plt) <span class="string">'.fig'</span>]);
|
||
|
0081 <span class="keyword">if</span> options_.nograph, close(hplt), <span class="keyword">end</span>
|
||
|
0082 <span class="keyword">if</span> TeX
|
||
|
0083 fprintf(fidTeX,<span class="string">'\\begin{figure}[H]\n'</span>);
|
||
|
0084 <span class="keyword">for</span> jj = 1:nstar
|
||
|
0085 fprintf(fidTeX,<span class="string">'\\psfrag{%s}[1][][0.5][0]{%s}\n'</span>,deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
|
||
|
0086 <span class="keyword">end</span>
|
||
|
0087 fprintf(fidTeX,<span class="string">'\\centering\n'</span>);
|
||
|
0088 fprintf(fidTeX,<span class="string">'\\includegraphics[scale=0.5]{%s_Priors%s}\n'</span>,M_.fname,int2str(plt));
|
||
|
0089 fprintf(fidTeX,<span class="string">'\\caption{Priors.}'</span>);
|
||
|
0090 fprintf(fidTeX,<span class="string">'\\label{Fig:Priors:%s}\n'</span>,int2str(plt));
|
||
|
0091 fprintf(fidTeX,<span class="string">'\\end{figure}\n'</span>);
|
||
|
0092 fprintf(fidTeX,<span class="string">' \n'</span>);
|
||
|
0093 <span class="keyword">end</span>
|
||
|
0094 <span class="keyword">end</span> <span class="comment">% plt = 1:nbplt-1</span>
|
||
|
0095 hplt = figure(<span class="string">'Name'</span>,figurename);
|
||
|
0096 <span class="keyword">if</span> TeX
|
||
|
0097 TeXNAMES = [];
|
||
|
0098 NAMES = [];
|
||
|
0099 <span class="keyword">end</span>
|
||
|
0100 <span class="keyword">for</span> index=1:npar-(nbplt-1)*nstar
|
||
|
0101 i = (nbplt-1)*nstar + index;
|
||
|
0102 [x,f,abscissa,dens,binf,bsup] = <a href="draw_prior_density.html" class="code" title="function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);">draw_prior_density</a>(i);
|
||
|
0103 [nam,texnam] = <a href="get_the_name.html" class="code" title="function [nam,texnam] = get_the_name(k,TeX)">get_the_name</a>(i,TeX);
|
||
|
0104 <span class="keyword">if</span> TeX
|
||
|
0105 TeXNAMES = strvcat(TeXNAMES,texnam);
|
||
|
0106 NAMES = strvcat(NAMES,nam);
|
||
|
0107 <span class="keyword">end</span>
|
||
|
0108 <span class="keyword">if</span> lr
|
||
|
0109 subplot(lc,lr,index);
|
||
|
0110 <span class="keyword">else</span>
|
||
|
0111 subplot(nr,nc,index);
|
||
|
0112 <span class="keyword">end</span>
|
||
|
0113 hh = plot(x,f,<span class="string">'-k'</span>,<span class="string">'linewidth'</span>,2);
|
||
|
0114 set(hh,<span class="string">'color'</span>,[0.7 0.7 0.7]);
|
||
|
0115 box on
|
||
|
0116 title(nam,<span class="string">'Interpreter'</span>,<span class="string">'none'</span>)
|
||
|
0117 drawnow
|
||
|
0118 <span class="keyword">end</span> <span class="comment">% index=1:npar-(nbplt-1)*nstar</span>
|
||
|
0119 eval([<span class="string">'print -depsc2 '</span> M_.fname <span class="string">'_Priors'</span> int2str(nbplt)]);
|
||
|
0120 eval([<span class="string">'print -dpdf '</span> M_.fname <span class="string">'_Priors'</span> int2str(nbplt)]);
|
||
|
0121 saveas(hplt,[M_.fname <span class="string">'_Priors'</span> int2str(nbplt) <span class="string">'.fig'</span>]);
|
||
|
0122 <span class="keyword">if</span> options_.nograph, close(hplt), <span class="keyword">end</span>
|
||
|
0123 <span class="keyword">if</span> TeX
|
||
|
0124 fprintf(fidTeX,<span class="string">'\\begin{figure}[H]\n'</span>);
|
||
|
0125 <span class="keyword">for</span> jj = 1:npar-(nbplt-1)*nstar
|
||
|
0126 fprintf(fidTeX,<span class="string">'\\psfrag{%s}[1][][0.5][0]{%s}\n'</span>,deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
|
||
|
0127 <span class="keyword">end</span>
|
||
|
0128 fprintf(fidTeX,<span class="string">'\\centering\n'</span>);
|
||
|
0129 fprintf(fidTeX,<span class="string">'\\includegraphics[scale=0.5]{%s_Priors%s}\n'</span>,M_.fname,int2str(nbplt));
|
||
|
0130 fprintf(fidTeX,<span class="string">'\\caption{Priors.}'</span>);
|
||
|
0131 fprintf(fidTeX,<span class="string">'\\label{Fig:Priors:%s}\n'</span>,int2str(nbplt));
|
||
|
0132 fprintf(fidTeX,<span class="string">'\\end{figure}\n'</span>);
|
||
|
0133 fprintf(fidTeX,<span class="string">' \n'</span>);
|
||
|
0134 fprintf(fidTeX,<span class="string">'%% End of TeX file.\n'</span>);
|
||
|
0135 fclose(fidTeX);
|
||
|
0136 <span class="keyword">end</span>
|
||
|
0137 <span class="keyword">end</span>
|
||
|
0138
|
||
|
0139 <span class="comment">% SA 01-11-2005 v3TOv4</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>
|