Main Content

Use Requirements to Develop and Verify MATLAB Functions

This tutorial shows how to use Requirements Toolbox™ to use requirements to develop and verify a MATLAB® function. In this tutorial, you follow these steps to author requirements, link requirements to design and test artifacts, import requirements, track the implementation and verification progress, identify and address traceability gaps, and track changes:

  1. Author Requirements for MATLAB Function: Author requirements that describe the required behavior of a MATLAB function.

  2. Link Requirements to MATLAB Code: Trace requirements to the MATLAB code and tests by creating links that implement and verify the requirements.

  3. Import Requirements from Test Specifications: Import requirements to Requirements Toolbox from a test specification created in Microsoft® Word.

  4. Track Requirements Implementation Progress: Track the implementation progress of requirements by viewing the implementation status in the Requirements Editor.

  5. Track Requirements Verification Progress: Track the verification progress of requirements by viewing the verification status in the Requirements Editor.

  6. Identify and Address Traceability Gaps: Identify traceability gaps by using traceability matrices and diagrams and close the gaps by creating links.

  7. Track Changes to Requirements: Use change tracking to identify changes to requirements and assess the impact of the changes.

Examine Project

This tutorial uses the MyAdd project. To open the project, enter:

openProject("MyAdd");

The project contains:

  • A MATLAB function, located in the source folder

  • A Microsoft Word document that defines a test specification, located in the documents folder

  • A requirement set that contains requirements imported from Microsoft Word, located in the documents folder

  • MATLAB tests for the function, located in the tests folder

  • Links from the test requirements to the tests, located in the tests folder

  • A project startup MATLAB function, located in the utilities folder

The Project window shows the MyAdd project and its contents.

See Also

Apps