Testsuite: use XLSX for Octave and MATLAB ≥ R2012a, and XLS for MATLAB < R2012a
In 98bdf76581
, all XLSX files were removed in
favour of XLS, for compatibility with MATLAB R2009b.
But this broke the very same tests under Octave, since XLS support is not very
good there.
This commit implements a solution that works everywhere, by using XLSX whenever
possible, and XLS otherwise.
time-shift
parent
e2d90a949f
commit
12d7d8cef2
|
@ -800,6 +800,7 @@ EXTRA_DIST = \
|
|||
bvar_a_la_sims/bvar_sample.m \
|
||||
dates/fsdat_simul.m \
|
||||
dates/data_uav.xls \
|
||||
dates/data_uav.xlsx \
|
||||
external_function/extFunDeriv.m \
|
||||
external_function/extFunNoDerivs.m \
|
||||
external_function/extFunWithFirstAndSecondDerivs.m \
|
||||
|
@ -809,6 +810,7 @@ EXTRA_DIST = \
|
|||
filter_step_ahead/trend_cycle_decomposition_data.m \
|
||||
steady_state/walsh1_old_ss_steadystate.m \
|
||||
data/test.xls \
|
||||
data/test.xlsx \
|
||||
gsa/morris/nk_est_data.m \
|
||||
analytic_derivatives/fsdat_simul.m \
|
||||
fs2000/fsdat_simul.m \
|
||||
|
@ -837,6 +839,7 @@ EXTRA_DIST = \
|
|||
recursive/data_ca1.m \
|
||||
recursive/data_ca1_csv.csv \
|
||||
recursive/data_ca1_xls.xls \
|
||||
recursive/data_ca1_xls.xlsx \
|
||||
kalman_filter_smoother/fsdat_simul.m \
|
||||
kalman/lik_init/fs2000_common.inc \
|
||||
kalman/lik_init/fs2000_ns_common.inc \
|
||||
|
|
|
@ -20,4 +20,8 @@ end;
|
|||
|
||||
varobs dx dy;
|
||||
check;
|
||||
if isoctave || ~matlab_ver_less_than('7.14') % xlsread is able to read XLSX without Excel installed since R2012a
|
||||
estimation(datafile='test.xlsx',nobs=1000,mh_replic=2000,mh_jscale=1.3);
|
||||
else
|
||||
estimation(datafile='test.xls',nobs=1000,mh_replic=2000,mh_jscale=1.3);
|
||||
end
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,9 +41,17 @@ varobs log_nn;
|
|||
|
||||
%reading Excel sheet from column A on creates quarterly dseries starting in
|
||||
%1950
|
||||
estimation(first_obs=2,datafile=data_uav, xls_sheet=Tabelle1, xls_range=a1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
if isoctave || ~matlab_ver_less_than('7.14') % xlsread is able to read XLSX without Excel installed since R2012a
|
||||
estimation(first_obs=2,datafile='data_uav.xlsx', xls_sheet=Tabelle1, xls_range=a1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
else
|
||||
estimation(first_obs=2,datafile='data_uav.xls', xls_sheet=Tabelle1, xls_range=a1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
end
|
||||
shock_decomposition( parameter_set=posterior_median ) nn hh;
|
||||
|
||||
%reading Excel sheet from column B on creates annual dseries starting with 1
|
||||
estimation(first_obs=2,datafile=data_uav, xls_sheet=Tabelle1, xls_range=b1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
if isoctave || ~matlab_ver_less_than('7.14') % xlsread is able to read XLSX without Excel installed since R2012a
|
||||
estimation(first_obs=2,datafile='data_uav.xlsx', xls_sheet=Tabelle1, xls_range=b1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
else
|
||||
estimation(first_obs=2,datafile='data_uav.xls', xls_sheet=Tabelle1, xls_range=b1:b54, mh_replic=2, mh_nblocks=1, mh_jscale=1.1, mh_drop=0.8, plot_priors=0, smoother) log_nn nn hh ;
|
||||
end
|
||||
shock_decomposition( parameter_set=posterior_median ) nn hh;
|
||||
|
|
Binary file not shown.
|
@ -61,4 +61,8 @@ stderr e_ys,inv_gamma_pdf,1.2533,0.6551;
|
|||
stderr e_pies,inv_gamma_pdf,1.88,0.9827;
|
||||
end;
|
||||
|
||||
estimation(datafile=data_ca1_xls,first_obs=8,nobs=[76 79],mh_nblocks=1,prefilter=1,mh_jscale=0.5,mh_replic=2000,forecast=8) y_obs R_obs pie_obs dq de;
|
||||
if isoctave || ~matlab_ver_less_than('7.14') % xlsread is able to read XLSX without Excel installed since R2012a
|
||||
estimation(datafile='data_ca1_xls.xlsx',first_obs=8,nobs=[76 79],mh_nblocks=1,prefilter=1,mh_jscale=0.5,mh_replic=2000,forecast=8) y_obs R_obs pie_obs dq de;
|
||||
else
|
||||
estimation(datafile='data_ca1_xls.xls',first_obs=8,nobs=[76 79],mh_nblocks=1,prefilter=1,mh_jscale=0.5,mh_replic=2000,forecast=8) y_obs R_obs pie_obs dq de;
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue