Cosmetic change.

create a namespace for each {VAR/PAC} expectation model.
time-shift
Stéphane Adjemia (Scylla) 2018-12-19 11:43:26 +01:00
parent 351da3b865
commit 23e37e45c4
Signed by untrusted user who does not match committer: stepan
GPG Key ID: A6D44CB9C64CE77B
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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