Main Content


Class: slreq.Justification
Package: slreq

Add comments to justifications


newComment = addComment(jt,myComment)


newComment = addComment(jt,myComment) adds a comment, myComment, to the justification jt.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

Comment text to add to the requirement, specified as a string scalar or character vector.

Output Arguments

expand all

New comment data, returned as a structure containing these fields:

Name of the individual or organization who added the comment, returned as a character vector.

Date that the comment was added, returned as a datetime object.

Comment revision number, returned as an int32 object.

Comment text, returned as a character vector.


expand all

This example shows how to add comments to justifications.

Load the requirement set crs_req_justs.

rs = slreq.load("crs_req_justs");

Get a handle to the first justification in the requirement set.

jt = find(rs,Index=5);

Add a comment to the justification.

newComment = addComment(jt,"My new comment.");


Alternative Functionality


You can also add a comment by using the Requirements Editor. Select a justification and, in the right pane, under Comments, click Add Comment.

Version History

Introduced in R2018b