Main Content

exportToVersion

Class: slreq.ReqSet
Namespace: slreq

Export requirement set to previous MATLAB version

Syntax

tf = exportToVersion(rs,name,version)

Description

tf = exportToVersion(rs,name,version) saves a copy of the requirement set rs with the file name name that is compatible with the MATLAB® version version. The function returns 1 if the file exports. The function saves the file in the current folder. If the requirement set has an associated link set, exportToVersion also exports the link set and saves it in the current folder.

Note

You can export requirement sets only to version R2017b or later.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

File name for the exported requirement set, specified as a string scalar or character vector.

MATLAB version to export to, specified as a string scalar or character vector.

You can export to version R2017b or later.

Example: tf = exportToVersion(rs,"newLinkSet","R2021a")

Output Arguments

expand all

Export success status, returned as a logical 1 (true) or 0 (false).

Data Types: logical

Examples

expand all

This example shows how to export a requirement set to a file that is compatible with a previous version of MATLAB®.

Load the myReqSet requirement set.

rs = slreq.load("myReqSet");

Export the requirement set to a new file that is compatible with MATLAB R2020a. Name the new file myReqSet_20a.

tf = exportToVersion(rs,"myReqSet_20a","R2020a")
tf = logical
   1

Tips

  • You can export a link set to a previous version with the exportToVersion method of slreq.LinkSet.

Version History

Introduced in R2018a