131 lines
7.5 KiB
HTML
131 lines
7.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 stab_map_1</title>
|
|
<meta name="keywords" content="stab_map_1">
|
|
<meta name="description" content="function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname)">
|
|
<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> > stab_map_1.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>stab_map_1
|
|
</h1>
|
|
|
|
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname)</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 [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname) </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">function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname)
|
|
|
|
lpmat = Monte Carlo matrix
|
|
ibehaviour = index of behavioural runs
|
|
inonbehaviour = index of non-behavioural runs
|
|
aname = label of the analysis
|
|
iplot = 1 plot cumulative distributions (default)
|
|
iplot = 0 no plots
|
|
ipar = index array of parameters to plot
|
|
dirname = (OPTIONAL) path of the directory where to save
|
|
(default: current directory)
|
|
|
|
Plots: dotted lines for BEHAVIOURAL
|
|
solid lines for NON BEHAVIOURAL
|
|
USES smirnov</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="cumplot.html" class="code" title="function h = cumplot(x);">cumplot</a> function h =cumplot(x)</li><li><a href="smirnov.html" class="code" title="function [H,prob,d] = smirnov(x1 , x2 , alpha, iflag )">smirnov</a> Smirnov test for 2 distributions</li></ul>
|
|
This function is called by:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
<li><a href="stab_map_.html" class="code" title="function x0 = stab_map_(Nsam, fload, ksstat, alpha2, prepSA, pprior, ilptau, OutputDirectoryName)">stab_map_</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 [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname)</a>
|
|
0002 <span class="comment">%function [proba, dproba] = stab_map_1(lpmat, ibehaviour, inonbehaviour, aname, iplot, ipar, dirname)</span>
|
|
0003 <span class="comment">%</span>
|
|
0004 <span class="comment">% lpmat = Monte Carlo matrix</span>
|
|
0005 <span class="comment">% ibehaviour = index of behavioural runs</span>
|
|
0006 <span class="comment">% inonbehaviour = index of non-behavioural runs</span>
|
|
0007 <span class="comment">% aname = label of the analysis</span>
|
|
0008 <span class="comment">% iplot = 1 plot cumulative distributions (default)</span>
|
|
0009 <span class="comment">% iplot = 0 no plots</span>
|
|
0010 <span class="comment">% ipar = index array of parameters to plot</span>
|
|
0011 <span class="comment">% dirname = (OPTIONAL) path of the directory where to save</span>
|
|
0012 <span class="comment">% (default: current directory)</span>
|
|
0013 <span class="comment">%</span>
|
|
0014 <span class="comment">% Plots: dotted lines for BEHAVIOURAL</span>
|
|
0015 <span class="comment">% solid lines for NON BEHAVIOURAL</span>
|
|
0016 <span class="comment">% USES smirnov</span>
|
|
0017
|
|
0018 <span class="keyword">global</span> estim_params_ bayestopt_ M_ options_
|
|
0019
|
|
0020 <span class="keyword">if</span> nargin<5,
|
|
0021 iplot=1;
|
|
0022 <span class="keyword">end</span>
|
|
0023 fname_ = M_.fname;
|
|
0024 <span class="keyword">if</span> nargin<7,
|
|
0025 dirname=<span class="string">''</span>;;
|
|
0026 <span class="keyword">end</span>
|
|
0027
|
|
0028 nshock = estim_params_.nvx;
|
|
0029 nshock = nshock + estim_params_.nvn;
|
|
0030 nshock = nshock + estim_params_.ncx;
|
|
0031 nshock = nshock + estim_params_.ncn;
|
|
0032
|
|
0033 npar=size(lpmat,2);
|
|
0034 ishock= npar>estim_params_.np;
|
|
0035
|
|
0036 <span class="keyword">if</span> nargin<6,
|
|
0037 ipar=[1:npar];
|
|
0038 <span class="keyword">end</span>
|
|
0039 nparplot=length(ipar);
|
|
0040
|
|
0041 <span class="comment">% Smirnov test for Blanchard;</span>
|
|
0042 <span class="keyword">for</span> j=1:npar,
|
|
0043 [H,P,KSSTAT] = <a href="smirnov.html" class="code" title="function [H,prob,d] = smirnov(x1 , x2 , alpha, iflag )">smirnov</a>(lpmat(ibehaviour,j),lpmat(inonbehaviour,j));
|
|
0044 proba(j)=P;
|
|
0045 dproba(j)=KSSTAT;
|
|
0046 <span class="keyword">end</span>
|
|
0047 <span class="keyword">if</span> iplot
|
|
0048 lpmat=lpmat(:,ipar);
|
|
0049 ftit=bayestopt_.name(ipar+nshock*(1-ishock));
|
|
0050
|
|
0051 <span class="keyword">for</span> i=1:ceil(nparplot/12),
|
|
0052 figure(<span class="string">'name'</span>,aname),
|
|
0053 <span class="keyword">for</span> j=1+12*(i-1):min(nparplot,12*i),
|
|
0054 subplot(3,4,j-12*(i-1))
|
|
0055 <span class="keyword">if</span> ~isempty(ibehaviour),
|
|
0056 h=<a href="cumplot.html" class="code" title="function h = cumplot(x);">cumplot</a>(lpmat(ibehaviour,j));
|
|
0057 set(h,<span class="string">'color'</span>,[0 0 0], <span class="string">'linestyle'</span>,<span class="string">':'</span>)
|
|
0058 <span class="keyword">end</span>
|
|
0059 hold on,
|
|
0060 <span class="keyword">if</span> ~isempty(inonbehaviour),
|
|
0061 h=<a href="cumplot.html" class="code" title="function h = cumplot(x);">cumplot</a>(lpmat(inonbehaviour,j));
|
|
0062 set(h,<span class="string">'color'</span>,[0 0 0])
|
|
0063 <span class="keyword">end</span>
|
|
0064 title([ftit{j},<span class="string">'. D-stat '</span>, num2str(dproba(ipar(j)),2)],<span class="string">'interpreter'</span>,<span class="string">'none'</span>)
|
|
0065 <span class="keyword">end</span>
|
|
0066 saveas(gcf,[dirname,<span class="string">'\'</span>,fname_,<span class="string">'_'</span>,aname,<span class="string">'_SA_'</span>,int2str(i)])
|
|
0067 eval([<span class="string">'print -depsc2 '</span> dirname <span class="string">'\'</span> fname_ <span class="string">'_'</span> aname <span class="string">'_SA_'</span> int2str(i)]);
|
|
0068 eval([<span class="string">'print -dpdf '</span> dirname <span class="string">'\'</span> fname_ <span class="string">'_'</span> aname <span class="string">'_SA_'</span> int2str(i)]);
|
|
0069 <span class="keyword">if</span> options_.nograph, close(gcf), <span class="keyword">end</span>
|
|
0070 <span class="keyword">end</span>
|
|
0071 <span class="keyword">end</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> |