# data2state

Map past data to states of state-space and nonlinear ARX models

## Description

maps the past data to the states of a state-space or a nonlinear ARX model
`X`

= data2state(`sys`

,`PastData`

)`sys`

.

`PastData`

can be a `timetable`

, a comma-separated input/output matrix pair, or a
time-domain `iddata`

object.

For timetables and data objects, `data2state`

matches the
input/output channels based on the channel names in `sys`

and
ignores nonmatching channels.

`X`

contains the state values at the time instant immediately
after the most recent data sample in `PastData`

. The software
computes the state estimates by minimizing the 1-step ahead prediction error between
predicted response and output signal in `PastData`

.

`data2state`

is useful for continued model
simulation. That is, suppose you have simulated a model up to a certain
time instant and would like to then simulate the model for future
inputs. Use `data2state`

to estimate states of
the model at the beginning of the second simulation.

## Examples

## Input Arguments

## Output Arguments

## Version History

**Introduced in R2008a**

## See Also

`idnlarx/findop`

| `findstates`

| `getDelayInfo`

| `sim`

| `order`