Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Johannes Pfeifer
dynare
Commits
36903ee8
Commit
36903ee8
authored
May 31, 2010
by
Marco Ratto
Browse files
1) eliminated the use of struct2local;
2) better heading/comments
parent
73c46ee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/pm3_core.m
View file @
36903ee8
function
myoutput
=
pm3_core
(
myinputs
,
fpar
,
nvar
,
whoiam
,
ThisMatlab
)
% PARALLEL CONTEXT
% Core functionality for pm3.m function, which can be parallelized.
% INPUTS
% See See the comment in random_walk_metropolis_hastings_core.m funtion.
% OUTPUTS
% o myoutput [struc]
%
%
% ALGORITHM
% Portion of McMCDiagnostics.m function.
%
% SPECIAL REQUIREMENTS.
% None.
% Copyright (C) 2007-2010 Dynare Team
%
% This file is part of Dynare.
...
...
@@ -20,7 +36,25 @@ function myoutput=pm3_core(myinputs,fpar,nvar,whoiam, ThisMatlab)
if
nargin
<
4
,
whoiam
=
0
;
end
struct2local
(
myinputs
);
% Reshape 'myinputs' for local computation.
% In order to avoid confusion in the name space, the instruction struct2local(myinputs) is replaced by:
tit1
=
myinputs
.
tit1
;
nn
=
myinputs
.
nn
;
n2
=
myinputs
.
n2
;
Distrib
=
myinputs
.
Distrib
;
varlist
=
myinputs
.
varlist
;
MaxNumberOfPlotsPerFigure
=
myinputs
.
MaxNumberOfPlotsPerFigure
;
name3
=
myinputs
.
name3
;
tit3
=
myinputs
.
tit3
;
Mean
=
myinputs
.
Mean
;
if
whoiam
Parallel
=
myinputs
.
Parallel
;
MasterName
=
myinputs
.
MasterName
;
DyMo
=
myinputs
.
DyMo
;
end
global
options_
M_
oo_
...
...
@@ -68,6 +102,13 @@ for i=fpar:nvar
NAMES
=
strvcat
(
NAMES
,
name
);
title
(
name
,
'Interpreter'
,
'none'
)
end
if
isstruct
(
options_
.
parallel
)
if
options_
.
parallel
.
Local
==
0
DirectoryName
=
CheckPath
(
'Output'
);
end
end
if
subplotnum
==
MaxNumberOfPlotsPerFigure
|
i
==
nvar
eval
([
'print -depsc2 '
M_
.
dname
'/Output/'
M_
.
fname
'_'
name3
'_'
deblank
(
tit3
(
i
,:))
'.eps'
]);
if
~
exist
(
'OCTAVE_VERSION'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment