주요 콘텐츠

Simulink.sdi.save

R2026b

Save Simulation Data Inspector session

Description

Simulink.sdi.save(fileName) saves all runs, signals, and visualization settings for all tabs as a Simulation Data Inspector session in the file fileName.

A session file includes data as well as visualization information from all tabs (since R2026b). Use the Simulink.sdi.load function to open a session file in the Simulation Data Inspector. When the session file opens, you can choose to add the data to existing data in the Simulation Data Inspector or clear the existing data.

Using the Simulink.sdi.save function to save a Simulation Data Inspector session does not create a thumbnail preview image, resulting in a smaller file size compared to saving through the user interface.

To save only the visualization information across all tabs for reuse with other sets of data, use Simulink.sdi.saveView.

example

Simulink.sdi.save(fileName,Name=Value) saves runs, signals, and visualization settings in a session file according to the options specified by name-value pairs. (since R2024b)

example

Examples

collapse all

Save the runs, signals, and visualization settings from the current Simulation Data Inspector session.

Simulink.sdi.save("MySession.mldatx")

Save a Simulation Data Inspector session in an MLDATX 2.0 file with the smallest possible file size.

Simulink.sdi.save("mySession.mldatx",Version="2.0",Compression="compact")

Input Arguments

collapse all

Name for the session file.

Example: 'myData.mldatx'

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: Simulink.sdi.save("mySession.mldatx",Version="1.0",Compression="none")

Since R2024b

Session file version, specified as "2.0" or "1.0".

Example: Simulink.sdi.save(mySession.mldatx,Version="2.0")

Since R2024b

Compression option, specified as one of these options:

  • "fastest" — Similar save speed to an uncompressed file, smaller file size

  • "balanced" — Balance between file size and save speed

  • "compact" — Smallest file size, slowest save speed

  • "none" — Largest file size, fastest save speed

When you save a session file in version 2.0, the default compression option is "fastest". When you save a session file in version 1.0, the default compression option is "none".

Example: Simulink.sdi.save(mySession.mldatx,Compression="balanced")

Version History

Introduced in R2011b

expand all