parent
351da3b865
commit
23e37e45c4
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue