Testsuite / methods of moments: compatbility fix for MATLAB R2014a

MATLAB R2014a does not like some of the variable names that are passed to
table(). Disable that call, as under Octave.
time-shift
Sébastien Villemot 2021-01-19 16:10:40 +01:00
parent 68af1c80fe
commit 783598bdeb
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
3 changed files with 12 additions and 6 deletions

View File

@ -256,7 +256,9 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
if ~isoctave %there is no table command in Octave
% There is no table command in Octave
% The table command also crashes on MATLAB R2014a because it does not like variable names
if ~isoctave && ~matlab_ver_less_than('8.4')
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
@ -298,4 +300,4 @@ method_of_moments(
%, analytic_standard_errors
, se_tolx=1e-10
);
@#endif
@#endif

View File

@ -257,7 +257,9 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
if ~isoctave %there is no table command in Octave
% There is no table command in Octave
% The table command also crashes on MATLAB R2014a because it does not like variable names
if ~isoctave && ~matlab_ver_less_than('8.4')
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
@ -299,4 +301,4 @@ method_of_moments(
%, analytic_standard_errors
, se_tolx=1e-10
);
@#endif
@#endif

View File

@ -256,7 +256,9 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
if ~isoctave %there is no table command in Octave
% There is no table command in Octave
% The table command also crashes on MATLAB R2014a because it does not like variable names
if ~isoctave && ~matlab_ver_less_than('8.4')
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
@ -298,4 +300,4 @@ method_of_moments(
%, analytic_standard_errors
, se_tolx=1e-10
);
@#endif
@#endif