Fixed crash when x13 object is instantiated without exogenous variables.

(cherry picked from commit 3b7413de5dee93413581f7e87cfe08d3eb16d2d8)
parent d7cf13e5
......@@ -105,8 +105,8 @@ if ismember('regression', o.commands)
end
end
end
if isempty(o.regression.start)
fprintf(fid, ' start = %i.%i\n', o.x.init.year, o.x.init.subperiod);
if ~isempty(o.x) && isempty(o.regression.start)
fprintf(fid, ' start = %i.%i\n', year(o.x.init), subperiod(o.x.init));
end
end
fprintf(fid, '}\n\n');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment