| Contents | Index |
Compare signal data
[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.mat')
[matchNames, matchFigures, mismatchNames, mismatchFigures] = cgv.CGV.compare(data_set1, data_set2) compares data from two data sets which have common signal names between both executions. Possible outputs of the 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 all signals which have a common name between both executions.
[matchNames, matchFigures, mismatchNames, mismatchFigures] = cgv.CGV.compare(data_set1, data_set2, 'Plot', 'param_value') compares all signals and plots the signals according to param_value.
[matchNames, matchFigures, mismatchNames, mismatchFigures] = cgv.CGV.compare(data_set1, data_set2, 'Plot', 'none', 'Signals', signal_list, 'ToleranceFile', 'file_name.mat') compares only the given signals and produces no plots.
data_set1, data_set2 |
Output data from a model. After running the model, use the cgv.CGV.getOutputData function to get the data. The cgv.CGV.getOutputData function returns a cell array of all output signal names. |
varargin |
Variable number of parameter name and value pairs. |
You can specify the following argument properties for the cgv.CGV.compare function using parameter name and value argument pairs. These parameters are 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 datasets
'mismatch'(default): plot the comparison of the mismatched signals from the two datasets
'none': do not produce a plot
A cell array of strings, where each string is a signal name in the dataset. Use cgv.CGV.getSavedSignals to view the list of available signal names in the dataset. signal_list can contain an individual signal or multiple signals. The syntax for an individual signal name is:
signal_list = {'log_data.subsystem_name.Data(:,1)'}The syntax for multiple signal names is:
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)'};If a model component contains a space or newline character, MATLAB adds parantheses and a single quote to the name of the component. For example, if a section of the signal has a space, 'block name', MATLAB displays the signal name as:
log_data.('block name').Data(:,1)To use the signal name as input to a CGV function, 'block name' must have two single quotes. For example:
signal_list = {'log_data.(''block name'').Data(:,1)'}If Signals is not present, all signals are compared.
Name for the file created by the cgv.CGV.createToleranceFile function. The file contains the signal names and the associated tolerance parameter name and value pair for comparing the data.
Depending on the data and the parameters, any of the following output arguments might be empty.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |