Main Content


Check if logging is configured to log data to disk or memory

Since R2021a



    storageMode = Simulink.sdi.getStorageMode returns the configured logging storage mode as 'disk' or 'memory'. By default, data logged to the workspace and the Simulation Data Inspector is logged to disk.


    collapse all

    You can configure whether data logged in simulation logs to memory or to disk. By default, data is logged to disk and brought into memory on demand. If your machine has more RAM than disk space, you may want to log data to memory instead.

    Use the Simulink.sdi.getStorageMode function to check whether logging is configured to store logged data on disk or in memory.

    storageMode = Simulink.sdi.getStorageMode
    storageMode =

    Output Arguments

    collapse all

    Where logged simulation data is stored on your machine, returned as 'disk' or 'memory'.

    Version History

    Introduced in R2021a