merge (iddata) - Merge data sets into one iddata object

Syntax

dat = merge(dat1,dat2,....,datN)

Description

dat collects the data sets in dat1, ...,datN into one iddata object, with several experiments. The number of experiments in dat will be the sum of the number of experiments in datk. For the merging to be allowed, a number of conditions must be satisfied:

The sampling intervals, the number of observations, and the input properties (Period, InterSample) might be different in the different experiments.

You can retrieve the individual experiments by using the command getexp. You can also retrieve them by subreferencing with a fourth index.

dat1 = dat(:,:,:,ExperimentNumber)

or

dat1 = dat(:,:,:,ExperimentName)

Storing multiple experiments as one iddata object can be very useful for handling experimental data that has been collected on different occasions, or when a data set has been split up to remove "bad" portions of the data. All the toolbox routines accept multiple-experiment data.

Examples

Bad portions of data have been detected around sample 500 and between samples 720 to 730. Cut out these bad portions and form a multiple-experiment data set that can be used to estimate models without the bad data destroying the estimate.

dat = merge(dat(1:498),dat(502:719),dat(731:1000))
m = pem(dat)

Use the first two parts to estimate the model and the third one for validation.

m = pem(getexp(dat,[1,2]));
compare(getexp(dat,3),m)

See also iddemo #9.

See Also

iddata 
getexp 

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS