MATLAB Function Reference | Go to function: | Search Help Desk

simulation_error | See Also

computes the mean square error of the simulated model

Syntax

    m=simulation_error(m,j,'plot')

    m=simulation_error(m,data,j)

Description

`m=simulation_error(m,j,'plot')` get the simulation error of the model `m` respect the output `j`. If the instead of the number of the output the label 'all' is given to the function the error respect all the outputs is returned in an array. The optional label `plot` may be specified if a plot of the original data and the simulation is desired.

`m=simulation_error(m,data,j)` get the error of the simulated model `m` respect the output `j` and the data `data` input-output set. `data` must be a structure defining the 'dat_in' and 'dat_out' fields which contain the input output data. If the instead of the number of the output `j` the label 'all' is given to the function the error respect all the outputs is returned in an array. The optional label `'plot'` may be specified if a plot of the original data and the simulation is desired.

Remarks

This function performs a simulation of the model using the `simulate` method and then calculates the mean square error by comparing the simulated output with the value of the output contained in the output data set.

See Also

error

[ Help Desk ]