Main Content

size

Determine size of iddata data set

Description

Return All Size Information

example

[ns,ny,nu,ne] = size(data) returns, for the iddata object data, the number of data samples ns in each experiment, the number of outputs ny, the number of inputs nu, and the number of experiments ne.

example

sd = size(data) returns the size information in the single argument sd.

  • For single experiments, sd has the form [ns,ny,nu,ne].

  • For multiple experiments, sd has the form [sum(ns),ny,nu,ne]. Here, sum(ns) is the total number of sample points from all the experiments.

Return Single Size Variable

ns = size(data,1) returns the number of data samples in each experiment.

ny = size(data,2) returns the number of output channels.

nu = size(data,3) returns the number of input samples.

ne = size(data,4) returns the number of experiments.

Display Size Information

size(data) displays the size information.

Examples

collapse all

Load the data, which is an iddata object that contains input/output data for three experiments.

load z123merge.mat z123
data = z123;

Get and store the dimensions of data in four separate variables.

[ns,ny,nu,ne] = size(data)
ns = 1×3

   300   400   300

ny = 1
nu = 1
ne = 3

Get and store the dimensions of data in a single variable.

sd = size(data)
sd = 1×4

        1000           1           1           3

The first element of sd is the total number of samples in the three experiments.

Input Arguments

collapse all

Estimation input/output data, specified as an iddata object that can contain any number of samples, input channels, output channels, and experiments.

Output Arguments

collapse all

Number of samples in each experiment of data, returned as row vector of positive integers with length ne.

Number of output channels in data, returned as a positive integer.

Number of input channels in data, returned as a positive integer.

Number of experiments in data, returned as a positive integer.

Combined size information, returned as a row vector containing the numbers of samples, output channels, input channels, and experiments.

  • For single experiments, sd has the form [ns,ny,nu,ne].

  • For multiple experiments, sd has the form [sum(ns),ny,nu,ne]. Here, sum(ns) is the total number of sample points from all the experiments.

Version History

Introduced in R2006a