%% Dot Notation
% A model created by arima has values assigned to all model properties. To change any of these property values, you do not need to reconstruct the whole model. You can modify property values of an existing model using dot notation. That is, type the model name, then the property name, separated by '.' (a period).
% For example, start with this model specification:

Mdl = arima(2,0,0)

%
% Modify the model to remove the constant term:

Mdl.Constant = 0

% The updated constant term now appears in the model output.
% Be aware that every model property has a data type. Any modifications you make to a property value must be consistent with the data type of the property. For example, AR, MA, SAR, and SMA are all cell vectors. This mean you must index them using cell array syntax.
%
% For example, start with the following model:

Mdl = arima(2,0,0)

%
% To modify the property value of AR, assign AR a cell array. Here, assign known AR coefficient values:

Mdl.AR  = {0.8,-0.4}

% The updated model now has AR coefficients with the specified equality constraints.
%
% Similarly, the data type of Distribution is a data structure. The default data structure has only one field, Name, with value 'Gaussian'.

Distribution = Mdl.Distribution

% To modify the innovation distribution, assign Distribution a new name or data structure. The data structure can have up to two fields, Name and DoF. The second field corresponds to the degrees of freedom for a Student's t distribution, and is only required if Name has the value 't'.
%
% To specify a Student's t distribution with unknown degrees of freedom, enter:

Mdl.Distribution = 't'

%
% The updated model has a Student's t distribution with NaN degrees of freedom. To specify a t distribution with eight degrees of freedom, say:

Mdl.Distribution = struct('Name','t','DoF',8)

%
% The degrees of freedom property of the model is updated. Note that the DoF field of Distribution is not directly assignable. For example, Mdl.Distribution.DoF = 8 is not a valid assignment. However, you can get the individual fields:

Mdl.Distribution.DoF

%
% You can modify Mdl to include, for example, two coefficients \beta_1 = 0.2 and \beta_2 = 4 corresponding to two predictor series. Since Beta has not been specified yet, you have not seen it in the output. To include it, enter:

Mdl.Beta=[0.2 4]

% Copyright 2015 The MathWorks, Inc.