Export traceability matrix into variable
显示 更早的评论
Hello all,
I have generated traceability matrix using multile artifacts in which on top level I have my simulink model and on left hand side I have requirement slreqx files. I am exporting the traceability matrix using option Export > Create MATLAB Variable and it is creating one variable in matlab workspace. But that variable does not contain content of all artifacts I kept on left hand side of traceability matrix, instead it is showing content of first artifcat only. Is there any way throguh which I can get contents of all the artifacts that are present on left hand side of traceabilty matris in that variable?
回答(1 个)
Josh Kahn
2023-7-31
I was able to confirm the behavior you are seeing and entered it as a bug. Thanks for letting us know! As for a workaround, to get the contents of all of the artifacts on the left (requirement sets), you can either create the traceability matrix variable through the GUI for one set of artifacts at a time and then concatenate the output tables or you can use APIs to query the requirement set and links directly (slreq.load, find, and inLinks) then format the data however you want:
reqSet = slreq.load('MyReqSet.slreqx');
requirements = find(reqSet);
inLinks = arrayfun(@(requirement) requirement.inLinks, requirements, UniformOutput=false);
inLinks = [inLinks{:}];
Hope this helps,
Josh
类别
在 帮助中心 和 File Exchange 中查找有关 Track and Visualize Links 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!