User`s guide
1 Data Processing
Subreferencing Experiments
Use the following general syntax to subreference specifi c experiments in
iddata objects:
data(samples,outputchannels,inputchan nels,experimentname)
In this syntax, s amples specify one or more sample indexes, out putchannels
and inputchannels specify channel indexes or channel names, and
experimentname speci fies experiment indexes or names.
When specifying several experiment names, you must use a cell array of name
strings. The
iddata object stores experiments name in the ExperimentName
property.
For example, suppose the
iddata object data contains five experiments with
default names,
Exp1, Ex p2, Exp3 , Exp4,andExp5. Use the following syntax to
subreference the first and fifth experiment in
data:
data_sub = data(:,:,:,{'Exp1','Exp5'}) % Using experiment name
or
data_sub = data(:,:,:,[1 5]) % Using experiment index
Tip Use a colon (:) to denote all samples and all channels, and the empty
matrix (
[]) to specify no samples and no channels.
Alternatively, you can use the getexp com mand. The following example
shows how to subreference the first a nd fifth experim ent in
data:
data_sub = getexp(data,{'Exp1','Exp5'}) % Using experiment name
or
data_sub = getexp(data,[1 5]) % Using experiment index
The following example show s how to retrieve the first 100 samples of output
channels 2 and 3 and input channels 4 to 8 of Experiment 3:
dat(1:100,[2,3],[4:8],3)
1-58