Compare model output and measured output
compare(data,sys)
compare(data,sys,prediction_horizon)
compare(data,sys,style,prediction_horizon)
compare(data,sys1,...,sysN,prediction_horizon)
compare(data,sys1,style1,...,sysN,styleN,prediction_horizon)
compare(___,opt)
[y,fit,x0]
= compare(___)
compare(
plots
the simulated response of a dynamic system model, data
,sys
)sys
,
superimposed over validation data, data
, for
comparison. The plot also displays the normalized root mean square
(NRMSE) measure of the goodness of the fit.
The matching of the input/output channels in data
and sys
is
based on the channel names. Thus, it is possible to evaluate models
that do not use all the input channels that are available in data
.
compare(
compares
the predicted response of data
,sys
,prediction_horizon
)sys
to the measured response
in data
. Measured output values in data up to time tprediction_horizon
are
used to predict the output of sys
at time t
.
compare(
uses data
,sys
,style
,prediction_horizon
)style
to
specify the line type, marker symbol, and color.
compare(
compares
multiple dynamic systems responses on the same axes. data
,sys1,...,sysN,prediction_horizon
)compare
automatically
chooses colors and line styles in the order specified by the ColorOrder
and LineStyleOrder
properties
of the current axes.
compare(
compares
multiple systems responses on the same axes using the line type, marker
symbol, and color specified for each system.data
,sys1,style1,...,sysN,styleN,prediction_horizon
)
compare(___,
configures
the comparison using an option set, opt
)opt
.
[
returns the model response, y
,fit
,x0
]
= compare(___)y
,
goodness of fit value, fit
, and the initial states, x0
.
No plot is generated.

Validation data. Specify data as either an If If


When the time or frequency units of 

Prediction horizon specified as one of the following:
For timeseries models, use a finite value for Default: 

Line style, marker, and color of both the linear and marker,
specified as a one, two, or threepart string enclosed in single
quotes ( For more information about configuring the 

Comparison option set.


Model response. Measured output values in For multimodel comparisons, For multiexperiment data, For multimodel comparisons using multiexperiment data, If By default, the initial conditions required for computing the
response are estimated to maximize the fit to data. Use the 

NRMSE fitness value. The fit is calculated (in percentage) using: $$\text{fit}=100\left(1\frac{\left\lefty\widehat{y}\right\right}{\left\lefty\text{mean}\left(y\right)\right\right}\right)$$ where y is the validation data output and $$\widehat{y}$$ is
the output of For FRD models, If If For multimodel comparisons, For multiexperiment data, For multimodel comparisons using multiexperiment data, 

Initial conditions used to compute system response. When For multimodel comparisons, For multiexperiment data, For multimodel comparisons using multiexperiment data, 
bode
 chgFreqUnit
 chgTimeUnit
 compareOptions
 forecast
 goodnessOfFit
 interp
 predict
 resid
 sim