Main Content

Associate link set with model


    example,myLinkSet) associates the link set myLinkSet with the Simulink® model model.

    example,"undo") reverts the link set mapping to the previously stored mapping for the Simulink model. For more information, see Link Set Mapping.

    example,"clear") reverts the link set mapping to the default mapping. For more information, see Default Link Set Mapping.


    collapse all

    This example shows how to associate a link set file with a Simulink model.

    Open the model. Define the path to the link set file.

    model = "slvnvdemo_powerwindowController";
    myLinkSet = fullfile("slvnvdemo_powerwindowRequirements.slmx");

    Clear any existing link sets associated with the model.,"clear");
    Nothing to clear for ...\slvnvdemo_powerwindowController.slx

    Associate the link set with the model.,myLinkSet);
    Mapping ...\slvnvdemo_powerwindowController.slx to ...\slvnvdemo_powerwindowRequirements.slmx

    Revert to the previously stored link set mapping.,"undo")
    Removing C:\Users\jdoe\MATLAB\Examples\slrequirements-ex91255337\slvnvdemo_powerwindowRequirements.slmx for ...\slvnvdemo_powerwindowController.slx

    Input Arguments

    collapse all

    File path of the Simulink model, specified as a string scalar or character vector.

    Full path of the SLMX file that contains links for the model, specified as a string scalar or character vector.

    More About

    collapse all

    Link Set Mapping

    Requirements Toolbox maps a link set to a Model-Based Design artifact, such as a Simulink model, when you associate a link set with the artifact. When you open the artifact, the mapped link sets also open.

    Default Link Set Mapping

    The default link set mapping for a Model-Based Design artifact is the link set in the same folder as the source artifact with the name that combines the source artifact name and source artifact extension, separated by a tilde. For example, the link set mapping for myAdd.m is myAdd~m.slmx in the same folder as myAdd.m.

    Version History

    Introduced in R2015a