Allow commands without arguments and fix commands compatibility.

parent 86b2daf7
This diff is collapsed.
......@@ -28,6 +28,20 @@ switch S(1).type
disp(o.(S(1).subs))
else
if isequal(S(2).type,'()')
if ~ismember(S(1).subs, o.commands)
switch S(1).subs
case 'arima'
if ismember('automdl', o.commands)
error('x13:arima: ARIMA command is not compatible with AUTOMDL command!')
end
case 'automdl'
if ismember('arima', o.commands)
error('x13:automdl: AUTOMDL command is not compatible with ARIMA command!')
end
otherwise
end
o.command(end+1) = {S(1).subs};
end
if isempty(S(2).subs)
% Reset the member to its default (empty).
o.(S(1).subs) = setdefaultmember(S(1).subs);
......
......@@ -30,6 +30,7 @@ classdef x13<handle % --*-- Unitary tests --*--
check = []; % Check command.
x11 = []; % X11 cmmand
results = []; % Estimation results
commands = {}; % List of commands.
end
methods
......@@ -54,6 +55,7 @@ classdef x13<handle % --*-- Unitary tests --*--
o.check = setdefaultmember('check');
o.x11 = setdefaultmember('x11');
o.results = struct();
o.commands = {};
return
end
if isdseries(y)
......@@ -83,6 +85,7 @@ classdef x13<handle % --*-- Unitary tests --*--
o.check = setdefaultmember('check');
o.x11 = setdefaultmember('x11');
o.results = struct();
o.commands = {};
end
end
end
\ No newline at end of file
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