Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • giovanma/dynare
  • giorgiomas/dynare
  • Vermandel/dynare
  • Dynare/dynare
  • normann/dynare
  • MichelJuillard/dynare
  • wmutschl/dynare
  • FerhatMihoubi/dynare
  • sebastien/dynare
  • lnsongxf/dynare
  • rattoma/dynare
  • CIMERS/dynare
  • FredericKarame/dynare
  • SumuduK/dynare
  • MinjeJeon/dynare
  • camilomrch/dynare
  • DoraK/dynare
  • avtishin/dynare
  • selma/dynare
  • claudio_olguin/dynare
  • jeffjiang07/dynare
  • EthanSystem/dynare
  • stepan-a/dynare
  • wjgatt/dynare
  • JohannesPfeifer/dynare
  • gboehl/dynare
  • ebenetce/dynare
  • chskcau/dynare-doc-fixes
28 results
Select Git revision
Loading items
Show changes
Showing
with 151 additions and 103 deletions
function a= iseven(b)
% Copyright (C) 2014 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
a = ~mod(b,2);
\ No newline at end of file
File moved
function a = isodd(b)
% Copyright (C) 2014 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
a = mod(b,2);
\ No newline at end of file
File moved
File moved
...@@ -24,9 +24,10 @@ file = 1; ...@@ -24,9 +24,10 @@ file = 1;
for f=1:length(dd) for f=1:length(dd)
if ~(isequal(dd(f).name,'.') || isequal(dd(f).name,'..')) if ~(isequal(dd(f).name,'.') || isequal(dd(f).name,'..'))
if dd(f).isdir if dd(f).isdir
flist(file) = { get_directory_description([ basedir filesep dd(f).name]) }; r = get_directory_description([ basedir filesep dd(f).name]);
flist = { flist{:} r{:} };
else else
flist(file) = { [basedir filesep dd(f).name] }; flist{length(flist)+1} = [basedir filesep dd(f).name];
end end
file = file + 1; file = file + 1;
end end
......
...@@ -78,11 +78,12 @@ for i=1:nn ...@@ -78,11 +78,12 @@ for i=1:nn
fprintf(tid,str); fprintf(tid,str);
end end
fprintf(tid,['LOG = NaN;\n']); fprintf(tid,['LOG = NaN;\n']);
if isoctave
fprintf(tid,'catch\n'); fprintf(tid,'catch\n');
fprintf(tid,'exception = lasterror;\n'); fprintf(tid,'exception = lasterror;\n');
if isoctave
fprintf(tid, 'LOG = ''%s'';\n','The Log output is not available with Octave!'); fprintf(tid, 'LOG = ''%s'';\n','The Log output is not available with Octave!');
else else
fprintf(tid,'catch exception\n');
fprintf(tid,['LOG = getReport(exception,''extended'');\n']); fprintf(tid,['LOG = getReport(exception,''extended'');\n']);
end end
fprintf(tid,['T = NaN;\n']); fprintf(tid,['T = NaN;\n']);
......
...@@ -20,10 +20,6 @@ function [report, time] = run_unitary_tests(listoffiles) ...@@ -20,10 +20,6 @@ function [report, time] = run_unitary_tests(listoffiles)
report = {}; report = {};
for f=1:length(listoffiles) for f=1:length(listoffiles)
if iscell(listoffiles{f})
info = run_unitary_tests(listoffiles{f});
report = [report; info];
else
if isequal(listoffiles{f}(end-1:end),'.m') && isempty(strfind(listoffiles{f},'.#')) if isequal(listoffiles{f}(end-1:end),'.m') && isempty(strfind(listoffiles{f},'.#'))
if is_unitary_test_available(listoffiles{f}) if is_unitary_test_available(listoffiles{f})
disp(['***** Process unitary tests in ' listoffiles{f}]) disp(['***** Process unitary tests in ' listoffiles{f}])
...@@ -34,7 +30,6 @@ for f=1:length(listoffiles) ...@@ -34,7 +30,6 @@ for f=1:length(listoffiles)
end end
end end
end end
end
if nargout>1 if nargout>1
time = clock; time = clock;
......
...@@ -77,8 +77,10 @@ XtX = []; ...@@ -77,8 +77,10 @@ XtX = [];
data = read_variables(datafile,varobs,[],xls_sheet,xls_range); data = read_variables(datafile,varobs,[],xls_sheet,xls_range);
if qlag > FirstObservation if qlag >= FirstObservation
disp('VarSampleMoments :: not enough data to initialize! Try to increase FirstObservation.') fprintf('\nVarSampleMoments: The first used observation is %d, but there are %d lags.\n',FirstObservation,qlag)
fprintf('VarSampleMoments: Try to increase first_obs. Given the lags, it must be at least first_obs=%d.\n',qlag+1)
error('VarSampleMoments :: not enough data to initialize!')
return return
end end
......
...@@ -10,7 +10,7 @@ function warning_config() ...@@ -10,7 +10,7 @@ function warning_config()
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2008-2013 Dynare Team % Copyright (C) 2008-2015 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -34,7 +34,11 @@ warning('on', 'backtrace'); ...@@ -34,7 +34,11 @@ warning('on', 'backtrace');
if isoctave if isoctave
warning('off', 'Octave:separator-insert'); warning('off', 'Octave:separator-insert');
if octave_ver_less_than('4.0')
warning('off', 'Octave:matlab-incompatible'); warning('off', 'Octave:matlab-incompatible');
else
warning('off', 'Octave:language-extension');
end
warning('off', 'Octave:single-quote-string'); warning('off', 'Octave:single-quote-string');
warning('off', 'Octave:missing-semicolon'); warning('off', 'Octave:missing-semicolon');
warning('off', 'Octave:empty-list-elements'); warning('off', 'Octave:empty-list-elements');
......
function write_latex_definitions
%function write_latex_definitions
% Writes a latex file containing the variable names, latex names, and
% tags/comments
%
% INPUTS
% none
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global M_;
if M_.exo_det_nbr == 0
tables = {'Endogenous', 'Exogenous', 'Parameters'};
M_var_root = {'M_.endo', 'M_.exo', 'M_.param'};
else
tables = {'Endogenous', 'Exogenous', 'Exogenous Deterministic', 'Parameters'};
M_var_root = {'M_.endo', 'M_.exo', 'M_.exo_det', 'M_.param'};
end
fid = fopen([M_.fname '_latex_definitions.tex'], 'w');
for i=1:length(tables)
fprintf(fid, '\\begin{center}\n');
fprintf(fid, '\\begin{longtable}{ccc}\n');
fprintf(fid, ['\\caption{' tables{i} '}\\\\%%\n']);
fprintf(fid, '\\hline%%\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Variable}} &\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{\\LaTeX}} &\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
fprintf(fid, '\\hline\\hline%%\n');
fprintf(fid, '\\endfirsthead\n');
fprintf(fid, '\\multicolumn{3}{c}{{\\tablename} \\thetable{} -- Continued}\\\\%%\n');
fprintf(fid, '\\hline%%\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Variable}} &\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{\\LaTeX}} &\n');
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
fprintf(fid, '\\hline\\hline%%\n');
fprintf(fid, '\\endhead\n');
names = eval([M_var_root{i} '_names']);
tex = eval([M_var_root{i} '_names_tex']);
long = eval([M_var_root{i} '_names_long']);
for j=1:size(names,1)
fprintf(fid, '\\texttt{%s} & $%s$ & %s\\\\\n', ...
regexprep(strtrim(names(j,:)), '_', '\\_'), ...
strtrim(tex(j,:)), ...
regexprep(strtrim(long(j,:)), '_', '\\_'));
end
fprintf(fid, '\\hline%%\n');
fprintf(fid, '\\end{longtable}\n');
fprintf(fid, '\\end{center}\n');
end
fclose(fid);
end
...@@ -10,7 +10,7 @@ function writedata(fname) ...@@ -10,7 +10,7 @@ function writedata(fname)
% SPECIAL REQUIREMENT % SPECIAL REQUIREMENT
% none % none
% Copyright (C) 2007-2009 Dynare Team % Copyright (C) 2007-2014 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -29,9 +29,8 @@ function writedata(fname) ...@@ -29,9 +29,8 @@ function writedata(fname)
global M_ oo_ global M_ oo_
% xlswrite doesn't exist on Octave, and appeared in MATLAB 7.0 if isoctave && ~user_has_octave_forge_package('io')
if isoctave || matlab_ver_less_than('7.0') error('The io package is required to write XLS files from Octave')
error('Function not supported on your version of MATLAB or Octave')
end end
S=[fname '_endo.xls']; S=[fname '_endo.xls'];
......
noinst_PROGRAMS = block_kalman_filter mex_PROGRAMS = block_kalman_filter
nodist_block_kalman_filter_SOURCES = $(top_srcdir)/../../sources/block_kalman_filter/block_kalman_filter.cc nodist_block_kalman_filter_SOURCES = $(top_srcdir)/../../sources/block_kalman_filter/block_kalman_filter.cc
noinst_PROGRAMS = bytecode mex_PROGRAMS = bytecode
bytecode_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../sources -I$(top_srcdir)/../../sources/bytecode -I$(top_srcdir)/../../../preprocessor bytecode_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../sources -I$(top_srcdir)/../../sources/bytecode -I$(top_srcdir)/../../../preprocessor
......
noinst_PROGRAMS = dynare_simul_ mex_PROGRAMS = dynare_simul_
dynare_simul__CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../../dynare++/tl/cc -I$(top_srcdir)/../../../dynare++/kord -I$(top_srcdir)/../../sources $(CPPFLAGS_MATIO) dynare_simul__CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../../dynare++/tl/cc -I$(top_srcdir)/../../../dynare++/kord -I$(top_srcdir)/../../sources $(CPPFLAGS_MATIO)
......
noinst_PROGRAMS = logposterior logMHMCMCposterior
# We use shared flags so that automake does not compile things two times
AM_CPPFLAGS += -I$(top_srcdir)/../../sources/estimation/libmat -I$(top_srcdir)/../../sources/estimation/utils $(CPPFLAGS_MATIO) $(BOOST_CPPFLAGS) $(GSL_CPPFLAGS)
AM_LDFLAGS += $(LDFLAGS_MATIO) $(BOOST_LDFLAGS) $(GSL_LDFLAGS)
LDADD = $(LIBADD_DLOPEN) $(LIBADD_MATIO) $(GSL_LIBS)
TOPDIR = $(top_srcdir)/../../sources/estimation
MAT_SRCS = \
$(TOPDIR)/libmat/Matrix.hh \
$(TOPDIR)/libmat/Matrix.cc \
$(TOPDIR)/libmat/Vector.hh \
$(TOPDIR)/libmat/Vector.cc \
$(TOPDIR)/libmat/BlasBindings.hh \
$(TOPDIR)/libmat/DiscLyapFast.hh \
$(TOPDIR)/libmat/GeneralizedSchurDecomposition.cc \
$(TOPDIR)/libmat/GeneralizedSchurDecomposition.hh \
$(TOPDIR)/libmat/LapackBindings.hh \
$(TOPDIR)/libmat/LUSolver.cc \
$(TOPDIR)/libmat/LUSolver.hh \
$(TOPDIR)/libmat/QRDecomposition.cc \
$(TOPDIR)/libmat/QRDecomposition.hh \
$(TOPDIR)/libmat/VDVEigDecomposition.cc \
$(TOPDIR)/libmat/VDVEigDecomposition.hh
COMMON_SRCS = \
$(MAT_SRCS) \
$(TOPDIR)/DecisionRules.cc \
$(TOPDIR)/DecisionRules.hh \
$(TOPDIR)/DetrendData.cc \
$(TOPDIR)/DetrendData.hh \
$(TOPDIR)/EstimatedParameter.cc \
$(TOPDIR)/EstimatedParameter.hh \
$(TOPDIR)/EstimatedParametersDescription.cc \
$(TOPDIR)/EstimatedParametersDescription.hh \
$(TOPDIR)/EstimationSubsample.cc \
$(TOPDIR)/EstimationSubsample.hh \
$(TOPDIR)/InitializeKalmanFilter.cc \
$(TOPDIR)/InitializeKalmanFilter.hh \
$(TOPDIR)/KalmanFilter.cc \
$(TOPDIR)/KalmanFilter.hh \
$(TOPDIR)/LogLikelihoodSubSample.cc \
$(TOPDIR)/LogLikelihoodSubSample.hh \
$(TOPDIR)/LogLikelihoodMain.hh \
$(TOPDIR)/LogLikelihoodMain.cc \
$(TOPDIR)/LogPosteriorDensity.cc \
$(TOPDIR)/LogPosteriorDensity.hh \
$(TOPDIR)/LogPriorDensity.cc \
$(TOPDIR)/LogPriorDensity.hh \
$(TOPDIR)/ModelSolution.cc \
$(TOPDIR)/ModelSolution.hh \
$(TOPDIR)/Prior.cc \
$(TOPDIR)/Prior.hh \
$(TOPDIR)/SteadyStateSolver.cc \
$(TOPDIR)/SteadyStateSolver.hh \
$(TOPDIR)/utils/dynamic_dll.cc \
$(TOPDIR)/utils/dynamic_dll.hh \
$(TOPDIR)/utils/static_dll.cc \
$(TOPDIR)/utils/static_dll.hh
nodist_logposterior_SOURCES = \
$(COMMON_SRCS) \
$(TOPDIR)/logposterior.cc
nodist_logMHMCMCposterior_SOURCES = \
$(COMMON_SRCS) \
$(TOPDIR)/Proposal.cc \
$(TOPDIR)/Proposal.hh \
$(TOPDIR)/RandomWalkMetropolisHastings.hh \
$(TOPDIR)/logMHMCMCposterior.cc
noinst_PROGRAMS = gensylv mex_PROGRAMS = gensylv
gensylv_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../sources gensylv_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../sources
......
noinst_PROGRAMS = k_order_perturbation mex_PROGRAMS = k_order_perturbation
k_order_perturbation_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/src -I$(top_srcdir)/../../../dynare++/kord -I$(top_srcdir)/../../../dynare++/tl/cc -I$(top_srcdir)/../../../dynare++/utils/cc -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../../dynare++/integ/cc -I$(top_srcdir)/../../sources $(CPPFLAGS_MATIO) k_order_perturbation_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../dynare++/src -I$(top_srcdir)/../../../dynare++/kord -I$(top_srcdir)/../../../dynare++/tl/cc -I$(top_srcdir)/../../../dynare++/utils/cc -I$(top_srcdir)/../../../dynare++/sylv/cc -I$(top_srcdir)/../../../dynare++/integ/cc -I$(top_srcdir)/../../sources $(CPPFLAGS_MATIO)
......
noinst_PROGRAMS = kalman_steady_state mex_PROGRAMS = kalman_steady_state
kalman_steady_state_LDADD = $(LIBADD_SLICOT) kalman_steady_state_LDADD = $(LIBADD_SLICOT)
kalman_steady_state_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_SLICOT) kalman_steady_state_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_SLICOT)
......