주요 콘텐츠

slxpinfo

R2026b

High-level information about published or protected model

Since R2024b

Description

fileinfo = slxpinfo(filename) returns high-level information about the published or protected model specified by filename.

The function returns information equivalent to the published model report or the protected model report summary. For protected models, the function returns this information regardless of whether the protected model report is available.

example

Examples

collapse all

To get information about a published model, use the slxpinfo function.

fileinfo = slxpinfo("mymodel")
fileinfo = 

  struct with fields:

                    FileName: "C:\mydir\mymodel.slxp"
                   ModelName: "mymodel"
                 ContentType: "PublishedModel"
    SupportedFunctionalities: dictionary (string ⟼ struct) with 2 entries
                Dependencies: dictionary (string ⟼ struct) with 1 entry
           SupplementalFiles: "../readme.md"

The returned structure includes high-level information about the published model, such as the source model name. In this example, the published model supports two functionalities and includes one supplemental file.

To get information about the supported functionalities, inspect SupportedFunctionalities. This code displays the type of functionality, release, platform, and compiler for each entry.

targets = fileinfo.SupportedFunctionalities;
targetinfo = struct2table(targets.values);
subset = targetinfo(:,{'Type','Release','Platform','Compiler'})
subset =

  2×4 table

                Type                Release     Platform     Compiler 
    ____________________________    ________    _________    _________

    "model-reference-simulation"    "R2026b"    "win64"      "mingw64"
    "model-reference-simulation"    "R2026b"    "glnxa64"    "gcc"

To get information about a protected model, use the slxpinfo function.

fileinfo = slxpinfo("mymodel")
fileinfo = 

  struct with fields:

                        File: 'C:\mydir\mymodel.slxp'
                 ContentType: 'ProtectedModel'
             GeneratedReport: 'Off'
                ModelVersion: '1.0'
             SimulinkVersion: '26.2 (R2026b)'
        SimulinkCoderVersion: '26.2 (R2026b) 30-Jun-2026'
             HDLCoderVersion: ''
                 DateCreated: '2026-07-29T13:56:58Z'
                    Platform: 'win64'
                         Tag: 'GIT_COMMIT_27468#52​@TEAM_A'
         ReadOnlyViewSupport: 'Off'
           SimulationSupport: 'On'
       CodeGenerationSupport: 'On'
    HDLCodeGenerationSupport: 'Off'
    ConcurrentTaskingSupport: 'Off'
               CodeInterface: 'Model reference'
                      Target: 'grt'
                 Obfuscation: 'On'
    GeneratedCodeContentType: 'Obfuscated source code'

The returned structure includes high-level information about the protected model. In this example, the protected model reflects version 1.0 of the source model and supports both simulation and code generation.

Input Arguments

collapse all

Published or protected model filename or path, specified as a string or character vector.

Specify the file as a filename, relative path, or absolute path. When you do not provide a path, the file extension (.slxp) is optional.

When multiple files with the same name are on the MATLAB® path, the function uses the file higher on the path. For more information, see Shadowed Files.

Example: slxpinfo("mymodel")

Example: slxpinfo("mymodel.slxp")

Example: slxpinfo("mydir/mymodel.slxp")

Example: slxpinfo("C:/mydir/mymodel.slxp")

Data Types: char | string

Output Arguments

collapse all

High-level published or protected model information, returned as a structure. The fields of the structure differ depending on whether the file is a protected model or a published model.

For published models, the returned structure contains these fields:

  • FileName — Full path of file

  • ModelName — Model name, which can differ from filename

  • ContentType — Identification that the SLXP file is a published model

  • SupportedFunctionalities — Supported functionality and relevant environment information

  • Dependencies — Files used during model publishing to create the simulation and code generation targets

  • SupplementalFiles — Supplemental files included by the author, such as instructions, test results, and code coverage reports

For protected models, the returned structure contains these fields:

  • File — Full path of file

  • ContentType — Identification that the SLXP file is a protected model

  • GeneratedReport — Whether the protected model includes a report

  • ModelVersion — Corresponding version of the design file

  • SimulinkVersion — Simulink® release used to generate the protected model

  • SimulinkCoderVersion — Simulink Coder™ release used to generate code for the protected model

  • HDLCoderVersion — HDL Coder™ release used to generate code for the protected model

  • DateCreated — Creation date and time for the protected model

  • Platform — Platform used to generate the protected model

  • Tag — Tag with custom text to help identify the protected model

  • ReadOnlyViewSupport — Whether the protected model includes a read-only web view

  • SimulationSupport — Whether a model that references the protected model can run in normal, accelerator, or rapid accelerator mode

  • CodeGenerationSupport — Whether a model that references the protected model can run in external mode and support C and C++ code generation

  • HDLCodeGenerationSupport — Whether a model that references the protected model supports HDL code generation

  • ConcurrentTaskingSupport — Allow tasks to execute concurrently on target setting during model protection

  • CodeInterface — Interface for the generated code

  • Target — Supported system target files based on the System target file (Simulink Coder) setting during model protection and additions by the Simulink.ProtectedModel.addTarget (Simulink Coder) function

  • Obfuscation — Whether generated code is obfuscated

  • GeneratedCodeContentType — Appearance of the generated code

When you use this function to get information about a protected model created in a release before R2024b, the SimulinkCoderVersion and HDLCoderVersion fields are empty regardless of the supported functionality.

Alternative Functionality

When model protection generates a report for the protected model, open the report with the Simulink.ProtectedModel.open (Simulink Coder) function.

For a published model, open the report by double-clicking the file.

Version History

Introduced in R2024b

expand all