Export traceability matrix into variable

조회 수: 1 (최근 30일)
Niranjan Joshi
Niranjan Joshi 2023년 7월 28일
답변: Josh Kahn 2023년 7월 31일
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
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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by