User`s guide

1 Data Processing
Handling Missing Data and Outliers
In this section...
“Handling Missing Data” on page 1-90
“Handling Outliers” on page 1-91
“Example Extracting and M odeling Specic Data Segments” on page 1-92
“See Also” on page 1-93
Handling Missing Data
Data acquisition failures sometimes result in missing measurements b oth in
the input and the output signals. Wh en you import data that contains missing
values using the MATLAB Import Wizard, these values are automatically set
to
NaN (“Not-a-Number”). Na N serves as a ag for nonexistent or undened
data. When you plot data on a time-plot that contains missing values, gaps
appear on the plot where missing data exists.
You can use
misdata to estimate missing values. This command linearly
interpolates missing values to estimate the rst model. Then, it uses this
model to estimate the missing data as parameters by minimizing the output
prediction errors obtained from the r econs tructed data. You can specify the
model structure you w ant to use in the
misdata argument or estimate a
default-order model using the
n4sid method. F or more information, see the
misdata reference page.
Note You can only use misd ata on time-domain data stored in an iddata
object. For more information about creating iddata objects, see “Representing
Time- and Frequency-Domain Data Using iddata Objects” on page 1-47.
For example, suppose y and u are output and input signals that contain NaNs.
This data is sampled at
0.2 s. The follo wing syntax creates a new iddata
object with these input and output signals.
dat = iddata(y,u,0.2) % y and u contain NaNs
% representing missing data
1-90