Main Content

Simulink.sdi.setStorageLocation

Specify location for logged data on disk

    Description

    example

    Simulink.sdi.setStorageLocation(storagePath) configures storagePath as the location for simulation data logged to disk. By default, data is logged to the temporary directory on your computer.

    Note

    Logging data to a network location can degrade performance.

    Note

    The Simulink.sdi.setStorageLocation function configures the location of data logged to the workspace and Simulation Data Inspector when you log data to disk. The Simulink.sdi.setStorageLocation function does not configure the location of data logged to a file.

    Examples

    collapse all

    By default, data logged to the workspace and Simulation Data Inspector is stored in the temporary directory on your computer. You may want to change the location of logged data when you need to log large amounts of data and a secondary drive provides more storage capacity.

    Use the Simulink.sdi.setStorageLocation function to specify the location for the file that holds data logged to disk.

    Simulink.sdi.setStorageLocation('C:/Users/username/LoggedData');

    Input Arguments

    collapse all

    Location of data logged to disk, specified as a character vector or string. By default, data logs to the temporary directory on your computer.

    You may want to change the location of logged data when you need to log large amounts and a network location provides more storage capacity than your local machine. However, logging data to a network location can degrade performance.

    Example: 'C:/Users/username/LoggedData'

    Data Types: char | string

    Introduced in R2021a