| 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, savedHarnessFilePath]
= sldvmakeharness
[status, savedHarnessFilePath]
= sldvmakeharness(model)
[status, savedHarnessFilePath]
= sldvmakeharness(model, sldvDataFile)
[status, savedHarnessFilePath]
= sldvmakeharness(model, [], harnessFilePath)
[status, savedHarnessFilePath]
= sldvmakeharness(model, [], [], modelRefHarness)
[status, savedHarnessFilePath] = sldvmakeharness generates a test harness from the current Simulink model. If sldvmakeharness generates the test harness successfully, it returns status = 1. It also returns the path and file name for the generated harness model in savedHarnessFilePath. sldvmakeharness creates a harness model with no data; the harness includes one default test case that specifies default values for all input signals.
[status, savedHarnessFilePath] = sldvmakeharness(model) generates a test harness from model, which is a handle to a Simulink model or a string with the model name.
[status, savedHarnessFilePath] = sldvmakeharness(model, sldvDataFile) generates a test harness from the data file sldvDataFile. If the model name and data in sldvDataFile do not match the name and data of model, sldvmakeharness displays a warning, but it generates the harness and returns status = 1.
[status, savedHarnessFilePath] = sldvmakeharness(model, [], harnessFilePath) generates a test harness from model and stores it in harnessFilePath. If harnessFilePath is invalid, sldvmakeharness cannot save the harness, but it creates and opens it.
[status, savedHarnessFilePath] = sldvmakeharness(model, [], [], modelRefHarness) generates a test harness from model. If modelRefHarness is true, the test harness model includes model in a Model block. If modelRefHarness is false, the test harness model includes a copy of model.
Successful harness generation does not imply that the model is compatible with the Simulink Design Verifier software.
Create a test harness for the sldvdemo_cruise_control model:
[status, harnessfile] = sldvmakeharness('sldvdemo_cruise_control',...
'', '', 'true');sldvmakeharness creates a test harness model without analyzing the model:
In the Model Editor, select Simulation > Configuration Parameters.
In the Design Verifier Results pane, under Harness model options, set the options.
Click OK.
Select Tools > Design Verifier > Test Generation to run an analysis.
![]() | sldvisactive | sldvoptions | ![]() |

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 |