Compatibility fix for MATLAB R2014a

MATLAB R2014a does not like the syntax “abs(x).data” where “x” is a dseries.
time-shift
Sébastien Villemot 2021-06-16 17:36:00 +02:00
parent 820df39ff7
commit 88b427f7bc
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 1 deletions

View File

@ -126,6 +126,7 @@ fprintf('Estimate of e_c_m: %f \n', e_c_m_iterative_ols)
fprintf('Estimate of c_z_1: %f \n', c_z_1_iterative_ols)
fprintf('Estimate of c_z_2: %f \n', c_z_2_iterative_ols)
if any(abs(resid_nls-resid_iterative_ols).data > 1e-4)
difference = abs(resid_nls-resid_iterative_ols);
if any(difference.data > 1e-4)
error('Iterative OLS and NLS do not provide consistent results.')
end