How to export requirements to reqif with a script

I wan't write a m-script, that exports requirements to a reqif-File. Is there a function to export the requirements?

9 Comments

Please make it as easy as possible to write an answer. You cannot expect, that all readers know, what a "reqif-File" is.
Sorry but this is as specific as possible.If you don't know what a reqif-File is you may not have worked with the requirements in Matlab and can not answer my question.
The reqif-Format is the REQuirements-Interchange-Format. Please see your favorite internet search portal for detailed information.
Jan
Jan on 17 May 2021
Edited: Jan on 17 May 2021
This is your question. Instead of letting the readers search the information, you can post a matching link.
But how could someone, who does not know what the reqif-Format is, answer my question?
Do you want a user of this forum to write the complete code for you? Or do you know, what you want to solve and a specific Matlab problem blocks the process? I told us, that you want to write some code for the export.
It is the typical work of Matlab professionals to assist others with solving problems, they have never heared of before. If the customer defines the requirements clearly, the programmer implements them in code.
Maybe it helps to solve your poblem, if you ask more specifically. We can assume, that you searched in the internet for "Matlab reqif" already and read the corresponding documentation in Matlab's help sections. So how can we help you?
The reqif-Export is a feature, that you can do in the Matlab UI.
So someone who is familiar with the requirements part of matlab should know what I'm talking about.
I just want to know the command (probally one or two commands) to do this from a script.
Jan
Jan on 17 May 2021
Edited: Jan on 17 May 2021
Then my questions for clarifications did at leans bump your question to the top of the list of questions.
If you are able to do, what you want, through a GUI, you can use the profiler and the debugger to dig in the code of the callbacks to see, how this can be done programmatically. Although I do not use the reqif export, I'm familiar with methods to analyse code.
Note that most frequent contributors have little experience with Simulink. So if your question is only applicable to Simulink (as a quick search seems to suggest), your chances of getting a solution are not great and the turn-around time might be substantially longer.
This sounds like a plan. How can I debug the Matlab UI and see what the command behind my UI operation is?

Sign in to comment.

Answers (2)

Hi Andreas,
There is no public API for exporting requirements to a ReqIF file. You must use the Requirements Editor.
If the searched function is implemented as M-function, you find the correspodning M-files using the profiler:
profile on % type this in the command window
... trigger the button in the GUI
profile report
Now you see a list of called function. Now you can set a break point in a function, which looks, like it does, what you need. Check the values of the input arguments or maybe the way to call it is documented.
As long as you dig in M-functins only, I assume, this is not a "reverse engineering", which would be a conflict with the license agreement.

Categories

Find more on Software Development Tools in Help Center and File Exchange

Products

Release

R2021a

Asked:

on 14 May 2021

Answered:

on 7 Jun 2021

Community Treasure Hunt

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

Start Hunting!