Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
c88a8aaa
Commit
c88a8aaa
authored
Oct 8, 2012
by
MichelJuillard
Browse files
Options
Downloads
Patches
Plain Diff
changed warnings into errors when load_mh_file or recovery is used and
there is no metropolis history file
parent
b7b50fa9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/CutSample.m
+2
-4
2 additions, 4 deletions
matlab/CutSample.m
matlab/metropolis_hastings_initialization.m
+3
-6
3 additions, 6 deletions
matlab/metropolis_hastings_initialization.m
with
5 additions
and
10 deletions
matlab/CutSample.m
+
2
−
4
View file @
c88a8aaa
...
@@ -37,12 +37,10 @@ DirectoryName = CheckPath('metropolis',M_.dname);
...
@@ -37,12 +37,10 @@ DirectoryName = CheckPath('metropolis',M_.dname);
file
=
dir
([
DirectoryName
,
filesep
,
M_
.
fname
'_mh_history.mat'
]);
file
=
dir
([
DirectoryName
,
filesep
,
M_
.
fname
'_mh_history.mat'
]);
files
=
dir
([
DirectoryName
,
filesep
,
M_
.
fname
'_mh*.mat'
]);
files
=
dir
([
DirectoryName
,
filesep
,
M_
.
fname
'_mh*.mat'
]);
if
~
length
(
files
)
if
~
length
(
files
)
disp
(
'MH:: FAILURE! there is no MH file to load here!'
)
error
(
'MH:: FAILURE! there is no MH file to load here!'
)
return
end
end
if
~
length
(
file
)
if
~
length
(
file
)
disp
(
'MH:: FAILURE! there is no MH-history file!'
)
error
(
'MH:: FAILURE! there is no MH-history file!'
)
return
else
else
load
([
DirectoryName
'/'
M_
.
fname
'_mh_history.mat'
])
load
([
DirectoryName
'/'
M_
.
fname
'_mh_history.mat'
])
end
end
...
...
This diff is collapsed.
Click to expand it.
matlab/metropolis_hastings_initialization.m
+
3
−
6
View file @
c88a8aaa
...
@@ -221,12 +221,10 @@ elseif options_.load_mh_file && ~options_.mh_recover
...
@@ -221,12 +221,10 @@ elseif options_.load_mh_file && ~options_.mh_recover
file
=
dir
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
]);
file
=
dir
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
]);
files
=
dir
([
MhDirectoryName
filesep
ModelName
'_mh*.mat'
]);
files
=
dir
([
MhDirectoryName
filesep
ModelName
'_mh*.mat'
]);
if
~
length
(
files
)
if
~
length
(
files
)
disp
(
'MH:: FAILURE! there is no MH file to load here!'
)
error
(
'MH:: FAILURE! there is no MH file to load here!'
)
return
end
end
if
~
length
(
file
)
if
~
length
(
file
)
disp
(
'MH:: FAILURE! there is no MH-history file!'
)
error
(
'MH:: FAILURE! there is no MH-history file!'
)
return
else
else
load
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
])
load
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
])
end
end
...
@@ -281,8 +279,7 @@ elseif options_.mh_recover
...
@@ -281,8 +279,7 @@ elseif options_.mh_recover
disp
(
' '
)
disp
(
' '
)
file
=
dir
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
]);
file
=
dir
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
]);
if
~
length
(
file
)
if
~
length
(
file
)
disp
(
'MH:: FAILURE! there is no MH-history file!'
)
error
(
'MH:: FAILURE! there is no MH-history file!'
)
return
else
else
load
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
])
load
([
MhDirectoryName
'/'
ModelName
'_mh_history.mat'
])
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment