MATLAB Help Center
Get requirement from Requirements Table block requirement row
Since R2026a
req = requirement(row)
req = requirement(row) returns the requirement, req, that corresponds to the Requirements Table block row specified by row.
req
row
example
collapse all
This example shows how to get an slreq.Requirement object from a corresponding RequirementRow object.
slreq.Requirement
RequirementRow
Load the duration_column_example_model model.
duration_column_example_model
model = "duration_column_example_model"; load_system(model)
Find the Requirements Table block in the model.
table = slreq.modeling.find(model);
Get the requirement rows as an array of RequirementRow objects.
rows = getRequirementRows(table);
Get the slreq.Requirement object from the first row in the Requirements Table block.
reqRow = rows(1); req = requirement(reqRow)
req = Requirement with properties: Type: 'Functional' Id: '#2' Summary: 'Requirement 1' Description: 'Requirement 1' Keywords: {} Rationale: '' CreatedOn: 18-Mar-2022 12:54:04 CreatedBy: 'ssatinov' ModifiedBy: 'ssatinov' IndexEnabled: 1 IndexNumber: [] SID: 2 FileRevision: 1 ModifiedOn: 18-Mar-2022 12:54:04 Dirty: 0 Comments: [0×0 struct] Index: '1'
Requirement row in the Requirements Table block, specified as a RequirementRow object.
Requirement, specified as an slreq.Requirement object.
Introduced in R2026a
RequirementsTable
requirementRow
slreq.modeling.create
slreq.modeling.find
findRequirementRow
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office