Plot the Noise Spectrum at the Command Line

To plot the disturbance spectrum of an input-output model or
the output spectrum of a time series model, use spectrum. To customize such plots, or
to turn on the confidence region view programmatically for such plots,
use spectrumplot instead.

To determine if your estimated noise model is good enough, you
can compare the output spectrum of the estimated noise-model H to
the estimated output spectrum of v(t). To compute v(t),
which represents the actual noise term in the system, use the following
commands:

ysimulated = sim(m,data);
v = ymeasured-ysimulated;

ymeasured is data.y. v is
the noise term v(t), as described in What Does a Noise Spectrum Plot Show? and
corresponds to the difference between the simulated response ysimulated and
the actual response ymeasured.