fixing writeOutput for observation_trends
Fixing a bug that I introduced in 2021
Merge request reports
Activity
added bug label
assigned to @sebastien
It seems that this behaviour has been there for a very long time (it’s been like this at least since we switched to git).
Note that this cannot be merged without adapting the MATLAB code accordingly, because the latter expects a string and evaluates it (see for example line 43 of
matlab/compute_trend_coefficients.m
). Otherwise several tests will fail (e.g.fs2000/fs2000a.mod
). Do you plan to work on the corresponding merge request for the MATLAB code?Also note that, for consistency, if we decide to apply this change, it should also be made to
deterministic_trends
.To say it otherwise, I don’t understand why you say there is a bug. The MATLAB code works fine with the preprocessor as it currently is, and no longer works with your proposed change.
So it looks to me that you are rather suggesting a change in the implementation, which indeed looks like an improvement because I don’t understand why the expression is currently passed as a string and is later evaluated. But if you want to make this change, it has to be done consistently throughout the MATLAB code (and also with
deterministic_trends
).Edited by Sébastien Villemot