| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Design Verifier |
| Contents | Index |
| Learn more about Simulink Design Verifier |
status = sldvharnessmerge(name, models, initialization_commands)
status = sldvharnessmerge(name, models, initialization_commands) collects the test data and initialization commands from each test harness model in models. sldvharnessmerge saves the data and initialization commands in name, which is a handle to a model.
initialization_commands is a cell array of strings the same length as models. It defines parameter settings for the test cases of each test harness model.
If the operation is successful, sldvharnessmerge returns a status of 1. Otherwise, it returns 0.
sldvharnessmerge requires that name and the models in models have only one Signal Builder block at the top level.
Use sldvharnessmerge with sldvgencov to combine test cases that use different sets of parameter values.
Analyze sldvdemo_cruise_control for decision and full coverage and merge the two test harnesses:
model = 'sldvdemo_cruise_control'; open_system(model) % Collect decision coverage harness1 = 'first_harness'; opts1 = sldvoptions; opts1.Mode = 'TestGeneration'; opts1.ModelCoverageObjectives = 'Decision'; opts1.HarnessModelFileName = harness1; sldvrun(model, opts1); % Collect full coverage harness2 = 'second_harness'; opts2.Mode = 'TestGeneration'; opts2 = sldvoptions; opts2.ModelCoverageObjectives = 'ConditionDecision'; opts2.HarnessModelFileName = harness2; sldvrun(model, opts2); % Merge the two harness files: status = sldvharnessmerge(harness1, harness2);
sldvgencov | sldvmakeharness | sldvrun
![]() | sldvgencov | sldvisactive | ![]() |

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