Main Content

Simulink.sdi.getRecordData

Check record mode for logging

    Description

    example

    record= Simulink.sdi.getRecordDatareturns the currently configured value for theRecord modein the Simulation Data Inspector preferences. Whenrecordistrueor1, logged data is available to view during simulation and is recorded to the Simulation Data Inspector and workspace for analysis after simulation. Whenrecordisfalseor0, logged data is not recorded and is only available to view during simulation.

    Examples

    collapse all

    You can use theSimulink.sdi.getRecordDatafunction to check the configuration before starting a simulation to ensure you record data you want to save.

    record = Simulink.sdi.getRecordData
    record = logical 1

    TheRecord modesetting is restored toView and record dataat the start of each MATLAB®session.

    Output Arguments

    collapse all

    Record mode, returned as1(true) or0(false).

    • 1— Logged data is stored on disk and available in the workspace and Simulation Data Inspector after simulation.

    • 0— Logged data is not stored on disk and is only available to view during simulation. After simulation, no logged data is available in the Simulation Data Inspector or workspace. For more information, seeView Data Only During Simulation.

    Version History

    Introduced in R2021a