Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Pfeifer
dynare
Commits
bd8dfa8e
Commit
bd8dfa8e
authored
4 months ago
by
Johannes Pfeifer
Browse files
Options
Downloads
Patches
Plain Diff
clean_current_folder.m: update and document command
parent
b76781fe
Branches
4.7
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#11090
failed
4 months ago
Stage: build
Stage: test
Stage: pkg
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/manual/source/dynare-misc-commands.rst
+6
-0
6 additions, 0 deletions
doc/manual/source/dynare-misc-commands.rst
matlab/utilities/general/clean_current_folder.m
+8
-8
8 additions, 8 deletions
matlab/utilities/general/clean_current_folder.m
with
14 additions
and
8 deletions
doc/manual/source/dynare-misc-commands.rst
+
6
−
0
View file @
bd8dfa8e
...
...
@@ -22,6 +22,12 @@ Dynare misc commands
Puts the IRFs stored in ``oo_.irfs`` into vectors with the same name into the base workspace.
.. matcomm:: clean_current_folder ;
Cleans the current folder from all files generated by Dynare for the mod-files currently located in
the current folder. It will delete all class files (+folders), log-files, and folders generated by
previous runs of these files. Note that this also applies the results subfolder. Proceed with caution.
.. command:: prior_function(OPTIONS);
Executes a user-defined function on parameter draws from the prior
...
...
This diff is collapsed.
Click to expand it.
matlab/utilities/general/clean_current_folder.m
+
8
−
8
View file @
bd8dfa8e
function
clean_current_folder
()
% Copyright © 2014-20
17
Dynare Team
% Copyright © 2014-20
24
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -22,20 +22,20 @@ a = dir('*.mod');
for
i
=
1
:
length
(
a
)
[
~
,
basename
]
=
fileparts
(
a
(
i
)
.
name
);
if
exist
([
basename
'.m'
])
delete
([
basename
'.m'
]);
end
if
exist
([
basename
'.log'
])
if
isfile
([
basename
'.log'
])
delete
([
basename
'.log'
]);
end
if
exist
(
basename
,
'dir'
)
if
isfolder
(
basename
)
rmdir
(
basename
,
's'
);
end
if
exist
([
basename
'_steadystate.m'
])
if
isfolder
([
'+'
,
basename
])
[
~
,
~
]
=
rmdir
([
'+'
,
basename
],
's'
);
end
if
isfile
([
basename
'_steadystate.m'
])
movefile
([
basename
'_steadystate.m'
],[
'protect_'
basename
'_steadystate.m'
]);
end
delete
([
basename
'_*'
])
if
exist
([
'protect_'
basename
'_steadystate.m'
])
if
isfile
([
'protect_'
basename
'_steadystate.m'
])
movefile
([
'protect_'
basename
'_steadystate.m'
],[
basename
'_steadystate.m'
]);
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