Commit Graph

104 Commits (master)

Author SHA1 Message Date
Stéphane Adjemian (Ryûk) 735bd66d4d
Remove unused output arguments. 2023-12-18 07:48:27 +01:00
Sébastien Villemot 1d5a442fe5
Bump minimal required version of Octave to 7.1.0
Incidentally, this means that the JSONlab submodule is no longer needed, so it
is removed in the present commit.

Closes: #1907
2023-11-22 17:46:13 +01:00
Sébastien Villemot 7f58e819c6
Bump minimal required version of MATLAB to R2018b
Ref. #1907
2023-11-22 16:00:04 +01:00
Johannes Pfeifer f0b10ca9df
Octave: workaround for intersect with stable flag providing wrong third output (Octave bug #60347)
Uses function removed in 47477e152a
2023-10-11 09:26:04 -04:00
Sébastien Villemot 421eb1482c
Octave compatibility: qz() will be MATLAB-compatible in version 9
[skip ci]
2023-04-07 10:26:54 +02:00
Sébastien Villemot c4bc6316d0
Make matlab/missing/mex/mjdgges/mjdgges.m Octave-compatible
[skip ci]
2023-04-04 18:40:37 +02:00
Stéphane Adjemian (Guts) 5b72a3041c
Use new unit tests interface. 2023-01-02 22:58:20 +01:00
Johannes Pfeifer fe0606ae06 logarithmic_reduction.m: use positive penalty add-on 2022-10-11 16:13:03 +02:00
NormannR afb044c23e Fix cycle reduction:
(i) making the norms consistent between cycle_reduction and its test;
(ii) remove hard errors in cycle_reduction Fortran and Matlab routines
2022-10-11 12:11:30 +02:00
NormannR 855887b249 Implements a logarithmic reduction Fortran routine and the associated test 2022-10-11 12:11:06 +02:00
Normann Rion d17204cc84 Implements a cycle reduction Fortran routine and the associated test.
The Fortran routine replaces the former Matlab code in matlab/cycle_reduction.m
2022-10-03 14:38:12 +02:00
Stéphane Adjemian (Ryûk) 45c0e82f3b
Fix bug introduced in fdb1daad. 2022-05-20 10:29:44 +02:00
Stéphane Adjemian (Ryûk) fdb1daadc9
Deactivate third unit test (local_state_space_iteration_2). 2022-05-20 08:44:28 +02:00
Stéphane Adjemian (Ryûk) c033a08cec
Remove third unit test in local_state_space_iteration_2. 2022-05-13 22:14:07 +02:00
Stéphane Adjemian (Ryûk) 2ff705f15c
Change second unit test for local_state_space_iteration_2...
To something closer to what we actually do when we estimate a model.
2022-05-13 22:12:09 +02:00
Stéphane Adjemian (Ryûk) cd76bdff9e
Fix and update unit tests for local_state_space_iteration_2.
Add mat file with git lfs.
2022-05-13 12:13:46 +02:00
Stéphane Adjemian (Ryûk) c17728da83
Make sure matlab routine is used in first unit test. 2022-05-12 13:02:41 +02:00
Stéphane Adjemian (Ryûk) 49727cf7a0
Remove %$ in unit tests. 2022-05-12 13:00:44 +02:00
Stéphane Adjemian (Ryûk) 68887b36e6
Cosmetic change. 2022-05-12 13:00:02 +02:00
Stéphane Adjemian (Ryûk) 8edc6538bf
Rewrite header doc. 2022-05-12 12:58:32 +02:00
Sébastien Villemot 971a89fb73
Octave 7 now has ordqz (and ordeig was implemented in Octave 5) 2022-04-15 14:33:02 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +02:00
Johannes Pfeifer e8c3758fc7 disclyap_fast.m: fix check for convergence with NaN
[skip CI]
2021-06-11 14:22:10 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Stéphane Adjemian (Charybdis) 6fe97182da
Deactivate unit tests for gamrnd if statistical toolbox is available. 2021-04-09 12:44:59 +02:00
Sébastien Villemot 47477e152a
Bump minimal Octave version to 6.2.0 2021-03-12 16:21:57 +01:00
Sébastien Villemot dcfd45bd25
missing/unique_stable.m: also support cell arrays and 2nd output argument
Needed by aggregate.m.
2021-01-29 14:06:40 +01:00
Sébastien Villemot e26a5e2805
NLS: compatibility fix for Octave and MATLAB < R2014b 2021-01-15 17:42:00 +01:00
Sébastien Villemot 8f07a134a3
OLS + aggregate: compatibility fix for Octave < 6
unique(…, 'stable') does not exist in Octave 5.
2021-01-15 17:19:38 +01:00
Johannes Pfeifer eb52fd1eaa Add num_procs.m function in missing
Preserves ability to run Dynare with m-replacements

[skip CI]
2020-11-23 15:51:55 +01:00
Johannes Pfeifer c4c8a0256d Add mjdgges.m unit test
Closes https://git.dynare.org/Dynare/dynare/-/issues/1438
2020-11-13 15:55:20 +01:00
Sébastien Villemot f6c2471eef
New MEX for solving discrete Lyapunov equations with doubling algorithm
This is a Fortran 2008 rewrite of disclyap_fast.m.

Closes: #1737
2020-07-30 16:34:35 +02:00
Sébastien Villemot 6e0f104d7e
Bump minimal MATLAB version to R2014a
Ref. #1713
2020-04-07 16:32:32 +02:00
Sébastien Villemot 1912f67778
MATLAB compatibility fix: automatic broadcasting was introduced in R2016b
For earlier versions, either use bsxfun or handle special cases differently.
2020-01-13 18:30:28 +01:00
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot 4e314a529b
Bump minimal required Octave version to 4.4 2020-01-06 18:29:47 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Sébastien Villemot 98bdf76581
MATLAB R2009b compatibility fixes
— use XLS instead of XLSX in testsuite datafiles
— use optimset instead of optimoptions
— use quadv/quadl/quadgk instead of integral
— fix race condition in load_m_file_data_legacy.m tests
— use fallback implementation for intersect(…, 'stable')
2019-11-15 18:27:37 +01:00
Dóra Kocsis 4c49eddb97 Add fallback implementation for contains and splitlines functions. 2019-11-13 13:05:28 +01:00
Houtan Bastani 53ce6222c2
remove unused variable in dynare_config 2019-09-05 11:48:19 +02:00
Sébastien Villemot 82cef48eb4
A_times_B_kronecker_C MEX: remove the OpenMP codepath
Testing shows that it is slower than the BLAS path.
2019-06-25 17:26:14 +02:00
Sébastien Villemot e79c618f38
No longer automatically add M-file substitutes for missing MEX files
However, keep the substitutes under matlab/missing/mex/, so that they can be
manually added should the need arise.
2019-05-21 12:37:35 +02:00
Sébastien Villemot c8e8f04a56
Add a replacement for strjoin (missing in MATLAB < R2013a)
As a consequence, revert commits 2e1f189724 and
5d05adeab6.
2019-05-20 12:47:41 +02:00
Sébastien Villemot e48177543b
intersect(…, 'stable') was introduced in MATLAB R2013a
Re-use the existing Octave replacement by making it MATLAB-compatible.
2019-03-26 18:53:51 +01:00
Sébastien Villemot d6c449ea70
narginchk was introduced in MATLAB R2011b 2019-03-26 18:53:51 +01:00
Sébastien Villemot 04323301a5
isdiag was introduced in MATLAB R2014a
Provide a replacement by reusing a similar function that was under
matlab/general/utilities/.
2019-03-26 16:50:06 +01:00
Sébastien Villemot 870d75857c
Simplification for missing nanmean
Handle it as other functions from the Statistics toolbox
2019-02-25 15:28:23 +01:00
Sébastien Villemot 1f84bc051d
Under Octave, the "statistics" Forge package is now a requirement
The gamrnd fallback under matlab/missing/stats/ does not work under Octave
because the +gamrnd/ folder is not accessible (it has the same name as the
function, which does not work under Octave).

Instead of fixing this, rather make the statistics toolbox a requirement, since
anyways it is very easy to obtain under Octave.

Accordingly:
- do not try to run the unit tests of matlab/missing/stats/ under Octave
- merge the matlab/missing/stats-matlab/ into matlab/missing/stats/, since this
  directory is now MATLAB-only.

Also:
- move matlab/distributions/+gamrnd/ under matlab/missing/stats/ for
  consistency
- in the manual: remove obsolete link to Octave downloads on the Dynare
  website; update URL of Octave Forge

Closes #1638
2019-02-18 17:41:10 +01:00
Sébastien Villemot 0b1c465b38
Octave compatibility fix: intersect(..., 'stable')
The 'stable' option of intersect(), which keeps the element order of the first
argument, is not available on Octave. Provide a fallback implementation, and
adapt the code.
2019-02-15 18:43:19 +01:00
Sébastien Villemot fc74dded42
Increase tolerance in quantile.m unit test
The failure appeared because of (seemingly unrelated) changes in gamrnd, which
have modified the random seed when entering this test.
2018-12-17 12:38:41 +01:00