Main Content


Create file correlating tolerance information with signal names


cgvObj.createToleranceFile(file_name , signal_list, tolerance_list)


cgvObj.createToleranceFile(file_name , signal_list, tolerance_list) creates a MATLAB® file, named file_name, containing the tolerance specification for each output signal name in signal_list. Each signal name in the signal_list corresponds to the same location of a parameter name and value pair in the tolerance_list.

Input Arguments


Name for the file containing the tolerance specification for each signal. Use this file as input to and cgv.Batch.addTest.


A cell array of character vectors, where each vector is a signal name for data from the model. 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:

signal_list = {'log_data.subsystem_name.Data(:,1)'}
The syntax for multiple signal names is:
signal_list = {'log_data.block_name.Data(:,1)',...

To specify a global tolerance for the signals, include the reserved signal name, 'global_tolerance', in signal_list. Assign a global tolerance value in the associated tolerance_list. If signal_list contains other signals, their associated tolerance value overrides the global tolerance value. In this example, the global tolerance is a relative tolerance of 0.02.

signal_list = {'global_tolerance',...

tolerance_list = {{'relative', 0.02},...
	{'relative', 0.015},{'absolute', 0.05}};


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 the signal name 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 in the signal_list. For example:
signal_list = {'log_data.(''block name'').Data(:,1)'}


Cell array of cell arrays. Each element of the outer cell array is a cell array containing a parameter name and value pair for the type of tolerance and its value. Possible parameter names are 'absolute' | 'relative' | 'function'. There is a one-to-one mapping between each parameter name and value pair in the tolerance_list and a signal name in the signal_list. For example, a tolerance_list for a signal_list containing four signals might look like the following:

tolerance_list = {{'relative', 0.02},{'absolute', 0.06},...
	{'relative', 0.015},{'absolute', 0.05}};