%% Save Coverage Results
% This example shows how to save coverage data to a file.

% Copyright 2020 The MathWorks, Inc.


%%
% Start by loading the model into memory.

modelName = 'slvnvdemo_cv_small_controller';
load_system(modelName);

%%
% Simulate the model with the coverage settings that are saved with the
% model.
%

covData = cvsim(modelName);

%%
% Save a coverage data file called |coverage_data|, containing the coverage
% data in the |cvdata| object |covData|.
%

cvsave('coverage_data',covData);