compare
Compare signal data
Syntax
[matchNames, matchFigures, mismatchNames, mismatchFigures]
= cgv.CGV.compare(data_set1, data_set2)
[matchNames, matchFigures, mismatchNames, mismatchFigures]
= cgv.CGV.compare(data_set1, data_set2,
'Plot', param_value)
[matchNames, matchFigures, mismatchNames, mismatchFigures]
= cgv.CGV.compare(data_set1, data_set2,
'Plot', 'none', 'Signals', signal_list,
'ToleranceFile', file_name)
Description
[
compares
data from two data sets which have common signal names between both
executions. Possible outputs of the matchNames
, matchFigures
, mismatchNames
, mismatchFigures
]
= cgv.CGV.compare(data_set1
, data_set2
)cgv.CGV.compare
function
are matched signal names, figure handles to the matched signal names,
mismatched signal names, and figure handles to the mismatched signal
names. By default, cgv.CGV.compare
looks at the
signals which have a common name between both executions.
[
compares the
signals and plots the signals according to matchNames
, matchFigures
, mismatchNames
, mismatchFigures
]
= cgv.CGV.compare(data_set1
, data_set2
,
'Plot', param_value
)param_value
.
[
compares
only the given signals and does not produce plots.matchNames
, matchFigures
, mismatchNames
, mismatchFigures
]
= cgv.CGV.compare(data_set1
, data_set2
,
'Plot', 'none
', 'Signals', signal_list
,
'ToleranceFile', file_name
)
Input Arguments
|
Output data from a model. After running the model, use the |
|
Variable number of parameter name and value pairs. |
varargin Parameters
You can specify the following argument properties for the cgv.CGV.compare
function
using parameter name and value argument pairs. These parameters are
optional.
Plot
(optional)Designates which comparison data to plot. The value of this parameter must be one of the following:
'match'
: plot the comparison of the matched signals from the two data sets'mismatch'
(default): plot the comparison of the mismatched signals from the two datasets'none'
: do not produce a plot
Signals
(optional)A cell array of character vectors, where each vector is a signal name in the output data. Use
getSavedSignals
to view the list of available signal names in the output data.signal_list
can contain an individual signal or multiple signals. The syntax for an individual signal name is:The syntax for multiple signal names is:signal_list = {'log_data.subsystem_name.Data(:,1)'}
If a model component contains a space or newline character, MATLAB® adds parentheses and a single quote to the name of the component. For example, if a section of the signal has a space,signal_list = {'log_data.block_name.Data(:,1)',... 'log_data.block_name.Data(:,2)',... 'log_data.block_name.Data(:,3)',... 'log_data.block_name.Data(:,4)'};
'block name'
, MATLAB displays the signal name as:To use the signal name as input to a CGV function,log_data.('block name').Data(:,1)
'block name'
must have two single quotes. For example:signal_list = {'log_data.(''block name'').Data(:,1)'}
If
Signals
is not present, the signals are compared.Tolerancefile
(optional)Name for the file created by the
createToleranceFile
function. The file contains the signal names and the associated tolerance parameter name and value pair for comparing the data.
Output Arguments
Depending on the data and the parameters, the following output arguments might be empty.
|
Cell array of matching signal names. |
|
Array of figure handles for matching signals |
|
Cell array of mismatching signal names |
|
Array of figure handles for mismatching signals |