From 3c9b8fefa8e8d8cf3ef9536800709c2adc76299a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Wed, 31 Jan 2024 17:47:28 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20prototype=20of=20sparse=20?= =?UTF-8?q?{static,dynamic}=5FgN=5Ftt.m=20for=20N=E2=A9=BE2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit db1bad652209c2d6de9d42143bb2b51a0f507b5e) --- src/ModelTree.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 8d068593..e89c4be9 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -2618,7 +2618,8 @@ ModelTree::writeSparseModelMFiles(const string& basename) const ttlen += temporary_terms_derivatives[i].size(); open_file(m_dir / (prefix + "g" + to_string(i) + "_tt.m")); - output << "function T = " << prefix << "g" << i << "_tt(y, x, params" << ss_arg << ")" << endl + output << "function [T_order, T] = " << prefix << "g" << i << "_tt(y, x, params" << ss_arg + << ", T_order, T)" << endl << "if T_order >= " << i << endl << " return" << endl << "end" << endl -- GitLab