This example shows how to import and update requirements from a Microsoft® Word requirements document. The model demonstrates a simple two-button switch that passes through outputs when only one switch is pressed at a time.
Open the model. At the MATLAB® command prompt, enter:
mdl = 'rejectDoublePress'; open_system(fullfile(matlabroot,'examples','slrequirements',mdl))
The supporting requirements document is located at
This example uses a Microsoft Word document,
Reject_Double_Button_Press_Model_Requirements.docx. This document
contains a set of functional requirements for the
Reject_Double_Button_Press model. Open the document from
matlab/examples/slrequirements. The requirements in the document
appear in outline format with custom bookmarks for navigation. To get the best results
while importing and updating requirements, set up your Microsoft Word documents with document outlines and custom bookmarks.
Save the requirements document to a local folder before importing requirements from it.
Open the Requirements Editor. In the Apps tab, click Requirements Manager. In the Requirements tab, click Requirements Editor.
In the Requirements Editor, select File > Import.
For Document type, select Microsoft Word document, and select Reject_Double_Button_Press_Model_Requirements.docx as the Document location.
Import requirements as plain text, read-only references to a destination requirement set. In the Requirement Identification option group, select the options to use bookmarks and to ignore outline numbers. For more information on import options, see Import Options for Microsoft Word Documents.
The requirements from the Microsoft Word document are imported into the destination requirement set under a
Requirements that you import as read-only references retain their references to the source requirements document. To change your imported requirements, you must make the changes in the source document first and update your requirement set from within Simulink® Requirements™. For more information on updating requirements, see Update Imported Requirements
In the document,
add a new
2.1.5 The Red and Green Button outputs shall be 0 if no buttons are pressed.
Create a bookmark called
Red_and_Green_Button_Output_2_1_5 for the new
requirement and save the Microsoft Word document.
In the Requirements Editor, select the top-level node
Import1) of the destination requirement set. Update
the requirements by clicking Update in the
Properties side bar on the right.
Import1 and view the changes in the
Comments side bar. The
Revision number and the
UpdatedOn values are updated for the requirement