Main Content

sldvloadresults

Load Simulink Design Verifier analysis results for model

Description

example

status = sldvloadresults(model) loads the recently generated Simulink® Design Verifier™ analysis results for model in the Results Summary window. If model is not open, sldvloadresults opens the model.

To load the results from the data file, on the Design Verifier tab, in the Review Results section, click Load Earlier Results and open the data file. The sldvloadresults loads the result from this specified data file.

example

status = sldvloadresults(model, dataFile) loads the analysis results for model from dataFile in the Results Summary window. If model is not open, sldvloadresults opens the model. The function loads the results from dataFile.

Examples

collapse all

Load active Simulink Design Verifier analysis results for a specified model.

Open the sldvdemo_flipflop example model.

open_system('sldvdemo_flipflop');

Run the test generation analysis on the example model by using its default settings.

status = sldvrun('sldvdemo_flipflop')
Checking compatibility for test generation: model 'sldvdemo_flipflop'
Compiling model...done
Building model representation...done
'sldvdemo_flipflop' is compatible for test generation with Simulink Design Verifier.

Generating tests using model representation from 14-Dec-2018 16:33:34...
............

Completed normally.

Generating output files:

Results generation completed.

    Data file:
    H:\work\sldv_output\sldvdemo_flipflop\sldvdemo_flipflop_sldvdata.mat

status =

     1

Close the example model.

bdclose('sldvdemo_flipflop')

Reopen the example model. Load the recently generated analysis results.

sldvloadresults('sldvdemo_flipflop')
ans =

     1

You can view the loaded analysis results in the Simulink Design Verifier Results Summary window. To open the Results Summary window, on the Design Verifier tab, in the Review Results section, click Results Summary.

Load Simulink Design Verifier analysis results from data file for a specified model.

Open the sldvdemo_flipflop example model.

open_system('sldvdemo_flipflop')

Using the default settings, run the test generation analysis on the example model.

[status, filenames] = sldvrun('sldvdemo_flipflop')
Checking compatibility for test generation: model 'sldvdemo_flipflop'
Compiling model...done
Building model representation...done

Generating tests using model representation from 14-Dec-2018 16:36:43...
............

Completed normally.

Generating output files:

Results generation completed.

    Data file:
    H:\work\sldv_output\sldvdemo_flipflop\sldvdemo_flipflop_sldvdata.mat

status =

     1

Close the example model.

bdclose('sldvdemo_flipflop')

Reopen the example model. Load analysis results for the model from the data file that the analysis generated.

sldvloadresults('sldvdemo_flipflop',filenames.DataFile)
ans =

     1

You can view the loaded analysis results in the Simulink Design Verifier Results Summary window. To open the Results Summary window, on the Design Verifier tab, in the Review Results section, click Results Summary.

Input Arguments

collapse all

Name of the model or handle of model for which to load analysis results.

Example: 'sldvdemo_cruise_control'

Example: 'sldvdemo_flipflop'

The name of the data file containing the analysis results. dataFile must contain analysis results for the specified model.

If dataFile is generated with a previous version of model, when you load the results from dataFile, you might see unexpected effects. To avoid inconsistencies between your model and the analysis results data, when you specify dataFile, choose a data file that contains results from the same version of the model.

For more information about analysis data files, see Simulink Design Verifier Data Files.

Example: 'results.mat'

Example: 'sldv_output\sldvdemo_flipflop\sldvdemo_flipflop_sldvdata.mat'

Example: 'sldv_output\my_model\my_model_sldvdata.mat'

Output Arguments

collapse all

Outcome of attempt to load results, which returns as a logical value.

Logical Value ReturnedStatus of Loaded Results
trueProcessing completed normally.
falseAn error occurred.
Introduced in R2013b