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
.
To change display options, rightclick the plot to access the context menu. For more details about the menu, see Tips.
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 line and marker, specified
as a character vector. For example, For more information about configuring 

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, 
Rightclicking the plot opens the context menu, where you can access the following options:
Systems — Select systems to view simulated or predicted response. By default, the response of all systems is plotted.
Data Experiment — For multiexperiment data only. Toggle between data from different experiments.
Characteristics — View the following data characteristics:
Peak Value — View peak value of the data. Not applicable for frequencyresponse data.
Peak Response — View peak response of the data. Applicable for frequencyresponse data only.
Mean Value — View mean value of the data. Not applicable for frequencydomain or frequencyresponse data.
Confidence Region — View
the confidence region for the simulated response. Applicable when
the prediction horizon is Inf
. To specify number
of standard deviations for plotting the response confidence region,
doubleclick the plot and open the Property Editor dialog box. Specify
the number of standard deviations in the Options tab,
in Confidence Region for Identified Models. The
default value is 1
standard deviation.
Show — For frequencydomain and frequencyresponse data only.
Magnitude — View magnitude of frequency response of the system.
Phase — View phase of frequency response of the system.
Show Validation Data — Plot validation data. By default, the validation data is always plotted.
I/O Grouping — For datasets containing more than one input or output channel. Select grouping of input and output channels on the plot.
None — Plot inputoutput channels in their own separate axes.
All — Group all input channels together and all output channels together.
I/O Selector — For datasets containing more than one input or output channel. Select a subset of the input and output channels to plot. By default, all output channels are plotted.
Grid — Add grids to the plot.
Normalize — Normalize the yscale of all data in the plot.
Full View — Return to full view. By default, the plot is scaled to full view.
Prediction Horizon — For timedomain data with noisecomponent only. Set the prediction horizon, or choose simulation.
Initial Condition — Specify handling of initial conditions. Not applicable for frequencyresponse data.
Specify as one of the following:
Estimate — Treat the initial conditions as estimation parameters.
Zero — Set all initial conditions to zero.
Absorb delays and estimate — Absorb nonzero delays into the model coefficients and treat the initial conditions as estimation parameters. Use this option for discretetime models only.
Model Response Plot — Plot the simulated or predicted model response. Be default, the response plot is always shown.
Error Plot — Plot the error between the model response and validation data.
Properties — Open the Property Editor dialog box to customize plot attributes.
bode
 chgFreqUnit
 chgTimeUnit
 compareOptions
 forecast
 goodnessOfFit
 interp
 predict
 resid
 sim