主要内容

matlab.io.datastore.MLDATXSignalDatastore

Datastore for data saved in MLDATX file

Since R2026a

    Description

    A matlab.io.datastore.MLDATXSignalDatastore object lets you read and process big data saved in an MLDATX file. When individual signals saved in an MLDATX file are too large to fit into memory, refer to the data through an MLDATXSignalDatastore object. The data from the MLDATXSignalDatastore object loads incrementally in chunks that fit into memory. With this incremental loading, you can:

    • Load the stored data into a Simulink® model workspace during simulation.

    • Load signal data from an MLDATX file to the MATLAB workspace for processing without Simulink.

    Creation

    Create a matlab.io.Datstore.MLDATXSignalDatastore object using the getAsDatastore function. getAsDatastore returns a Simulink.SimulationData.Signal object that contains the datastore object.

    Properties

    expand all

    This property is read-only.

    Name and path of MLDATX file that contains the signal referred to by the datastore, represented as a character vector.

    This property is read-only.

    Name of signal referred to by the datastore, represented as a character vector.

    This property is read-only.

    Number of data points in the signal referred to by the datastore, represented as a positive integer.

    Number of data points to read from referenced signal each time the read is called, specified as 'auto' or a positive integer.

    Object Functions

    hasdata Determine whether data is available to read
    resetReset datastore to initial position
    readallRead all data in datastore
    readRead chunk of data in datastore
    preview Return subset of data from datastore
    progressReturn percentage of data read from datastore

    Examples

    collapse all

    Create an mldatx.io.File object referencing a saved MLDATX file.

    myFileObj = mldatxfile("MyFile.mldatx");

    Use the getAsDatastore function to create a Simulink.SimulationData.Signal object for the signal named mySig which is saved in the MLDATX file referenced by myFileObj. The MLDATXSignalDatastore object is stored in the Values property of the Signal object.

    mySigSignal = getAsDatastore(myFileObj,Name="mySig");
    mySigDatastore = mySigSignal.Values;

    Version History

    Introduced in R2026a