%% Get All Simulation Modes from cvdatagroup
% This example shows how to query the simulation modes of the coverage
% results inside a |cvdatagroup| object.

% Copyright 2020 The MathWorks, Inc.

%%
% Record coverage for slvnvdemo_cv_small_controller.

model_1 = 'slvnvdemo_cv_small_controller';
load_system(model_1)
cvdo1 = cvsim(model_1);

%%
% Record coverage for slvnvdemo_powerwindow_controller.

model_2 = 'slvnvdemo_powerwindow_controller';
load_system(model_2)
cvdo2 = cvsim(model_2);

%%
% Record coverage for slvnvdemo_counter.

model_3 = 'slvnvdemo_counter';
load_system(model_3)
cvdo3 = cvsim(model_3);

%%
% Add the three cvdata objects to a cv.cvdatagroup object.

cvdg = cv.cvdatagroup(cvdo1,cvdo2,cvdo3);

%%
% Get the simulation modes by using |allSimulationModes|.

simModes = allSimulationModes(cvdg)