From 03eaac8b6dcda50553d077bbb1068245652d7fb5 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Tue, 15 Jan 2019 10:50:01 +0100 Subject: [PATCH] make plot_contributions use get_ast_jsonmodel --- matlab/{ => ols}/getEquationsByTags.m | 0 matlab/plot_contributions.m | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) rename matlab/{ => ols}/getEquationsByTags.m (100%) diff --git a/matlab/getEquationsByTags.m b/matlab/ols/getEquationsByTags.m similarity index 100% rename from matlab/getEquationsByTags.m rename to matlab/ols/getEquationsByTags.m diff --git a/matlab/plot_contributions.m b/matlab/plot_contributions.m index 541608901..e71d4d84c 100644 --- a/matlab/plot_contributions.m +++ b/matlab/plot_contributions.m @@ -22,7 +22,7 @@ function plot_contributions(equationname, ds1, ds0) % [name='Phillips curve'] % pi = beta*pi(1) + slope*y + lam; -% Copyright (C) 2017 Dynare Team +% Copyright (C) 2017-2019 Dynare Team % % This file is part of Dynare. % @@ -98,9 +98,7 @@ else end % Get equation. -jsonmodel = loadjson(jsonfile); -jsonmodel = jsonmodel.model; -jsonmodel = getEquationsByTags(jsonmodel, 'name', equationname); +[~, jsonmodel] = get_ast_jsonmodel(eqtags); lhs = jsonmodel{1}.lhs; rhs = jsonmodel{1}.rhs;