From e758d5bdc90dc2a2879ab1a97e89ea712a759702 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 1 Feb 2019 11:37:41 +0100 Subject: [PATCH] ols parsing: fix bug: node value is not stored as string in AST --- matlab/ols/parse_ols_style_equation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/ols/parse_ols_style_equation.m b/matlab/ols/parse_ols_style_equation.m index 43acee2aa..93516bce7 100644 --- a/matlab/ols/parse_ols_style_equation.m +++ b/matlab/ols/parse_ols_style_equation.m @@ -303,7 +303,7 @@ end function X = evalNode(ds, node, line, X) if strcmp(node.node_type, 'NumConstNode') - X = dseries(str2double(node.value), ds.dates, 'const'); + X = dseries(node.value, ds.dates, 'const'); elseif strcmp(node.node_type, 'VariableNode') if ~(strcmp(node.type, 'endogenous') ... || (strcmp(node.type, 'exogenous') && any(strcmp(ds.name, node.name))))