Main Content

Simulink.io.SLDVMatFile Class

Namespace: Simulink.io

Read Simulink Design Verifier format data in MAT file

Since R2022a

Description

The Simulink.io.SLDVMatFile class inherits from the Simulink.io.MatFile reader class, which inherits from the Simulink.io.FileType base class. This class reads the data in the sldvData structure used by Simulink® Design Verifier™. The data is contained in a MAT file. To import data from a MAT file that contains the sldvData structure, use this class.

classdef Simulink.io.SLDVMatFile < Simulink.io.MatFile

The Simulink.io.SLDVMatFile class is a handle class.

Class Attributes

Abstract
false
HandleCompatible
true

For information on class attributes, see Class Attributes.

Properties

expand all

Simulink Design Verifier data format reader, specified as a character array.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Methods

expand all

Public Methods

Examples

collapse all

List the test cases in a Simulink Design Verifier MAT file. The whos() method returns a structure with the fields name and type. The structure contains the names of all the test cases in the sldvData structure file along with the type Dataset.

fileName = 'foo.mat';
aReader = Simulink.io.SLDVMatFile(fileName);
resultOfWhos = whos(aReader);

Load the data. The load() method converts the test case data in the sldvData structure into Simulink.SimulationData.Dataset objects. The result is a structure where each field is the name of the test case and the value is the corresponding dataset object.

loadedVars = load(aReader);

Import the data. Similarly to load(), the import() method converts the test case data in the sldvData structure into Simulink.SimulationData.Dataset objects. The result is a structure with fields Data and Names. The Names field contains the name of the test cases. The Data field contains the corresponding dataset objects.

importedVars = import(aReader);

Version History

Introduced in R2022a