From 23e37e45c42251ee3e03130954b0b8932b1a14a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemia=20=28Scylla=29?= Date: Wed, 19 Dec 2018 11:43:26 +0100 Subject: [PATCH] Cosmetic change. create a namespace for each {VAR/PAC} expectation model. --- matlab/print_expectations.m | 4 ++-- tests/var-expectations/10/example.mod | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/print_expectations.m b/matlab/print_expectations.m index 80756c4e9..56c1b4a63 100644 --- a/matlab/print_expectations.m +++ b/matlab/print_expectations.m @@ -247,8 +247,8 @@ fclose(fid); % Third print a routine for evaluating VAR_EXPECTATION/PAC_EXPECTATION term (returns a dseries object). % kind = strrep(expectationmodelkind, '-', '_'); -mkdir(sprintf('+%s/+%s', M_.fname, kind)); -filename = sprintf('+%s/+%s/evaluate_%s.m', M_.fname, kind, expectationmodelname); +mkdir(sprintf('+%s/+%s/+%s', M_.fname, kind, expectationmodelname)); +filename = sprintf('+%s/+%s/+%s/evaluate.m', M_.fname, kind, expectationmodelname); fid = fopen(filename, 'w'); fprintf(fid, 'function ds = evaluate_%s(dbase)\n\n', expectationmodelname); fprintf(fid, '%% Evaluates %s term (%s).\n', kind, expectationmodelname); diff --git a/tests/var-expectations/10/example.mod b/tests/var-expectations/10/example.mod index 23246fb82..7b1542ee9 100644 --- a/tests/var-expectations/10/example.mod +++ b/tests/var-expectations/10/example.mod @@ -60,7 +60,7 @@ verbatim; ts = simul_backward_model(initialconditions, 15); foo = ts.foo.data; % Evaluate the (VAR) expectation term - ts{'toto'} = example.var_expectations.evaluate_varexp(ts); + ts{'toto'} = example.var_expectations.varexp.evaluate(ts); % Check tthat the evaluation is correct. range = dates('2000Q4'):dates('2004Q2'); if max(abs(ts(range).foo.data-ts(range).toto.data))>1e-5