Main Content

slvnvmergedata

Combine test data from data files

Description

merged_data = slvnvmergedata(data1,data2,...) combines two or more test cases and counterexamples data into a single test case data structure merged_data.

Input Arguments

collapse all

Generated by running slvnvlogsignals or by running a Simulink® Design Verifier™ analysis.

Output Arguments

collapse all

Structure that contains the merged test cases or counterexamples.

Examples

Log Signals and Merge Logged Data

This example shows how to merge logged data from multiple test cases.

Open the directory that contains the example files.

openExample('ComponentBasedModelingWithModelReferenceExample')

Open the sldemo_mdlref_basic model, which contains three Model blocks that reference the sldemo_mdlref_counter model.

open_system('sldemo_mdlref_basic');

Log the input signals to the three Model blocks.

data1 = slvnvlogsignals('sldemo_mdlref_basic/CounterA');
data2 = slvnvlogsignals('sldemo_mdlref_basic/CounterB');
data3 = slvnvlogsignals('sldemo_mdlref_basic/CounterC');

Merge the logged data.

merged_data = slvnvmergedata(data1, data2, data3);

Simulate the referenced model, sldemo_mdlref_counter, with coverage enabled with the merged data.

open_system('sldemo_mdlref_counter');
runOpts = slvnvruntestopts;
runOpts.coverageEnabled = true;
[ outData, initialCov ] = slvnvruntest('sldemo_mdlref_counter', ...
     merged_data, runOpts);

Generate a coverage report to view the results.

cvhtml('Initial coverage', initialCov);

See Also

(Simulink Design Verifier) | | | |

Introduced in R2011a