Skip to content
Snippets Groups Projects
Commit 00d67110 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Removed data files for tests/initval_file.

Generate the data instead with matlab's script
ramst_initval_file_data.m. Note that the excel files are only produced
and tested under Windows (xlswrite is not working on OS X, need to check
for Linux).
parent de5c541c
No related branches found
No related tags found
No related merge requests found
......@@ -211,6 +211,8 @@ XFAIL_MODFILES = ramst_xfail.mod \
estim_param_in_shock_value.mod \
optimal_policy/Ramsey/ramsey_ex_wrong_ss_file.mod
MFILES = initval_file/ramst_initval_file_data.m
# Dependencies
example1_use_dll.m.trs: example1.m.trs
example1_use_dll.o.trs: example1.o.trs
......@@ -285,6 +287,11 @@ deterministic_simulations/rbc_det_exo_lag_2c.m.trs: deterministic_simulations/rb
deterministic_simulations/rbc_det_exo_lag_2b.o.trs: deterministic_simulations/rbc_det_exo_lag_2a.o.trs
deterministic_simulations/rbc_det_exo_lag_2c.o.trs: deterministic_simulations/rbc_det_exo_lag_2a.o.trs
initval_file/ramst_initval_file.m.trs: initval_file/ramst_initval_file_data.m.tls
initval_file/ramst_initval_file.o.trs: initval_file/ramst_initval_file_data.o.tls
# Matlab TRS Files
M_TRS_FILES = $(patsubst %.mod, %.m.trs, $(MODFILES))
M_TRS_FILES += run_block_byte_tests_matlab.m.trs run_reporting_test_matlab.m.trs run_all_unitary_tests.m.trs
......@@ -295,12 +302,21 @@ O_TRS_FILES = $(patsubst %.mod, %.o.trs, $(MODFILES))
O_TRS_FILES += run_block_byte_tests_octave.o.trs run_reporting_test_octave.o.trs run_all_unitary_tests.o.trs
O_XFAIL_TRS_FILES = $(patsubst %.mod, %.o.trs, $(XFAIL_MODFILES))
# Matlab TLS Files
M_TLS_FILES = $(patsubst %.m, %.m.tls, $(MFILES))
# Octave TLS Files
O_TLS_FILES = $(patsubst %.m, %.o.tls, $(MFILES))
EXTRA_DIST = \
read_trs_files.sh \
run_test_matlab.m \
run_test_octave.m \
$(MODFILES) \
$(XFAIL_MODFILES) \
$(MFILES) \
run_block_byte_tests_matlab.m \
run_block_byte_tests_octave.m \
run_reporting_test_matlab.m \
......@@ -321,10 +337,6 @@ EXTRA_DIST = \
fs2000_ssfile_aux.m \
printMakeCheckMatlabErrMsg.m \
printMakeCheckOctaveErrMsg.m \
initval_file/ramst_initval_file_data.m \
initval_file/ramst_initval_file_data_col_vec_mat.mat \
initval_file/ramst_initval_file_data_row_vec_mat.mat \
initval_file/ramst_initval_file_excel.xls \
test.m \
AIM/data_ca1.m \
AIM/fs2000_b1L1L_AIM_steadystate.m \
......@@ -422,10 +434,22 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES)
DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" \
$(OCTAVE) --no-init-file --silent --no-history $< > $*.o.log 2>&1
%.m.tls : %.m
TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(MATLAB)/bin/matlab -nosplash -nodisplay -r run_m_script
touch $*.m.tls
%.o.tls : %.m
TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(OCTAVE) --no-init-file --silent --no-history run_m_script 2>&1
clean-local:
rm -f $(M_TRS_FILES) \
$(M_TLS_FILES) \
$(M_XFAIL_TRS_FILES) \
$(O_TRS_FILES) \
$(O_TLS_FILES) \
$(O_XFAIL_TRS_FILES) \
$(patsubst %.trs, %.log, $(M_TRS_FILES)) \
$(patsubst %.trs, %.log, $(M_XFAIL_TRS_FILES)) \
......@@ -492,3 +516,5 @@ clean-local:
ms-sbvar/tmv_rr_tr
rm -f estimation/test_matrix.mat
rm -f initval_file/ramst_initval_file_data_col_vec_mat.mat initval_file/ramst_initval_file_data_row_vec_mat.mat initval_file/ramst_initval_file_excel.xls
......@@ -22,26 +22,34 @@ k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
end;
disp('Test #1')
initval_file(filename = ramst_initval_file_data);
steady;
simul(periods=200);
disp('Test #2')
initval_file(filename = ramst_initval_file_data_row_vec_mat);
steady;
simul(periods=200);
disp('Test #3')
initval_file(filename = ramst_initval_file_data_col_vec_mat);
steady;
simul(periods=200);
initval_file(filename = ramst_initval_file_excel);
if ispc()
disp('Test #4')
initval_file(filename = ramst_initval_file_excel);
steady;
simul(periods=200);
end
x = vertcat([ 1; 1.2 ], repmat(1, 200, 1));
k = repmat(12.7551, 202, 1);
c = repmat(1.53061, 202, 1);
% save ramst_initval_file_data_col_vec_mat
% xlswrite('ramst_initval_file_excel',[x k c],1,'A2')
% xlswrite('ramst_initval_file_excel',{'x' 'k' 'c'},1,'A1')
% c=c'
% k=k'
% x=x'
% save ramst_initval_file_data_row_vec_mat
\ No newline at end of file
save('ramst_initval_file_data_col_vec_mat');
if ispc()
xlswrite('ramst_initval_file_excel',[x k c],1,'A2');
xlswrite('ramst_initval_file_excel',{'x' 'k' 'c'},1,'A1');
end
c=c';
k=k';
x=x';
save('ramst_initval_file_data_row_vec_mat');
\ No newline at end of file
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment