Export traceability matrix into variable

1 visualización (últimos 30 días)
Niranjan Joshi
Niranjan Joshi el 28 de Jul. de 2023
Respondida: Josh Kahn el 31 de Jul. de 2023
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?

Respuestas (1)

Josh Kahn
Josh Kahn el 31 de Jul. de 2023
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