Main Content

Author Requirements

Author natural language requirements in MATLAB® and Simulink®

Author requirements in MATLAB or Simulink by using the Requirements Editor, Requirements Perspective, or the programmatic interface. Capture details about the requirements as text, images, and tables by using requirement properties. Specify requirement types by using the built-in types, custom types, or stereotypes. Create requirement hierarchies that define relationships between child and parent requirements.

Apps

Requirements EditorCreate and edit requirements
Requirements ManagerManage requirements and links in model
Profile EditorCreate and manage profiles with stereotypes and properties

Functions

expand all

slreq.newCreate requirement set
slreq.editorOpen Requirements Editor
slreq.convertAnnotationConvert annotations to requirement objects
slreq.loadLoad requirement set, link set, or Requirements Table block
slreq.openOpen requirement set
slreq.clearClear requirements and links from memory
slreq.findFind requirement, reference, and link set artifacts
slreq.getCurrentObjectGet selected objects in Requirements Editor, Requirements Browser, or Requirements Table block (Since R2021a)

Classes

slreq.ReqSet Work with requirement sets
slreq.Requirement Work with requirement objects

Methods

expand all

Get Requirements in Requirement Set

findFind requirements in requirement set that have matching attribute values
childrenGet top-level items in requirement set

Add Requirements and Justifications

addAdd requirements to requirement set
addJustification Add justifications to requirement set

Customize Requirement Sets

profilesGet profiles assigned to requirement sets
saveProfileMappingSave profile mapping to XML file
importProfileAssign profile to requirement set
removeProfileRemove profile from requirement set
inspectAttributeGet information about requirement set custom attribute
updateAttributeUpdate information for requirement set custom attribute
deleteAttributeDelete custom attribute from requirement set

Automate Load and Save Tasks

getPostLoadFcnGet contents of PostLoadFcn callback
getPreSaveFcnGet contents of PreSaveFcn callback
setPostLoadFcnAssign PostLoadFcn callback script
setPreSaveFcnAssign PreSaveFcn callback script

Save and Close Requirement Sets

save Save requirement sets
closeClose requirement sets
discardClose requirement set without saving

Add and Remove Requirements

addAdd child requirement
copyCopy and paste requirement
removeRemove requirement from requirement set

Get Requirements and Requirement Sets

findFind children of parent requirements
childrenFind child requirements of a requirement
parentFind parent item of requirement
reqSetReturn parent requirement set

Move, Promote, and Demote Requirements

moveMove requirement in hierarchy
moveDownMove requirement down in hierarchy
moveUpMove requirement up in hierarchy
demoteDemote requirements
promotePromote requirements

Add Comments and Customize Requirements

addCommentAdd comments to requirements
getAttributeGet requirement property values
setAttributeSet requirement property values

Objects

slreq.ViewView settings (Since R2022b)

Topics

Define Requirements

Customize Requirements and Requirements Editor

Featured Examples