www.gusucode.com > econ 案例源码程序 matlab代码 > econ/ModifyTheInnovationDistributionExample.m

    %% Modify the Innovation Distribution
% After a model exists in the Workspace, you can modify its |Distribution|
% property using dot notation. You cannot modify the fields of the
% |Distribution| data structure directly. For example,
% |Mdl.Distribution.DoF = 8| is not a valid assignment. However, you can
% get the individual fields.
%%
% Start with an MA(2) model:

% Copyright 2015 The MathWorks, Inc.

Mdl = arima(0,0,2);
%%
% To change the distribution of the innovation process in an existing model
% to a Student's _t_ distribution with unknown degrees of freedom, type:
Mdl.Distribution = 't'
%%
% To change the distribution to a _t_ distribution with known degrees of
% freedom, use a data structure:
Mdl.Distribution = struct('Name','t','DoF',8)
%%
% You can get the individual |Distribution| fields:
DistributionDoF = Mdl.Distribution.DoF
%%
% To change the innovation distribution from a Student's
% _t_ back to a Gaussian distribution, type:
Mdl.Distribution = 'Gaussian'
%%
% The |Name| field is updated to |'Gaussian'|, and there is no longer a
% |DoF| field.