« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Time Series and Stochastic Differential Equations
Perform Spectral Analysis of a Time Series
Generate a sample path from an
ARProcess
[1]
.
In[1]:=
X
data = RandomFunction[ARProcess[{.2}, .1], {1, 5000}];
Compute smoothed estimates of the
PowerSpectralDensity
of the data.
In[2]:=
X
Plot[Evaluate@ Table[PowerSpectralDensity[data, \[Omega], i], {i, 5, 20, 5}], {\[Omega], -\[Pi], \[Pi]}, PlotRange -> All, ImageSize -> 300]
Out[2]=
The theoretical
PowerSpectralDensity
for the
ARProcess
.
In[3]:=
X
Plot[PowerSpectralDensity[ ARProcess[{.2}, .1], \[Omega]], {\[Omega], -\[Pi], \[Pi]}, PlotRange -> All, ImageSize -> 300]
Out[3]=