メインコンテンツ

removePublishedModelArtifact

R2026b

Remove artifact from published model

Since R2026b

Description

removePublishedModelArtifact(pubmdl,Name=Value) removes the specified functionality or supplemental files from the published model specified by pubmdl.

example

Examples

collapse all

To identify the supported functionality in a published model, call slxpinfo and extract the IDs from the SupportedFunctionalities field of the returned structure.

fileinfo = slxpinfo("mymodel");
targets = fileinfo.SupportedFunctionalities;
targetIDs = keys(targets)
targetIDs =

  4×1 string array

    "ModelRefCode_20260518T165532"
    "ModelRefCode_20260518T172324"
    "ModelRefSim_20260518T165516"
    "ModelRefSim_20260518T172220"

In this example, the published model supports four functionalities.

To remove functionality from the published model, use the IDs name-value argument.

removePublishedModelArtifact("mymodel.slxp",IDs=[targetIDs(1),targetIDs(2)])

To identify the supplemental files in a published model, call slxpinfo and extract the filenames from the SupplementalFiles field of the returned structure.

fileinfo = slxpinfo("mymodel");
files = fileinfo.SupplementalFiles
files = 

  1×2 string array

    "readme.md"    "calibration_data.mat"

In this example, the published model contains two supplemental files.

To remove a file from the published model, use the SupplementalFiles name-value argument.

removePublishedModelArtifact("mymodel.slxp",SupplementalFiles=files(2))

Input Arguments

collapse all

Published model, specified as a string or character vector.

Specify the published model filename with the .slxp extension.

Data Types: char | string

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: removePublishedModelArtifact("mymodel.slxp",IDs="ModelRefCode_20260504T164230")

Functionality to remove from the published model, specified as a string, character vector, or cell array of character vectors.

Identify each functionality by its ID provided by the slxpinfo function or published model report.

Data Types: char | string | cell

Names of supplemental files to remove from the published model, specified as a string, character vector, or cell array of character vectors.

Data Types: char | string | cell

Version History

Introduced in R2026b