Write and Read Variable into Simulink Model via Matlab or other
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi i would like to change value of variable in input and read the output of this model.
The main target is to write a scenari to validate all the logic of the model with a simple execution and generate a report with PASSED/FAILED status if all steps have been done correctly.
Thanks for your help.
댓글 수: 0
답변 (1개)
Anshuman
2023년 3월 21일
Hi Cyril,
To change the value of variable in input:
Open the Model Explorer. On the Modeling tab, click Model Explorer. In the Model Explorer Model Hierarchy pane, select the model workspace. In the Contents pane, select the variable. In the Contents pane or in Dialog pane, edit the value displayed.
To read the output, as soon as the simulation completes, an output variable is generated in the MATLAB workspace, which you can load and read the outputs.
For validating the logic and generating the report , you can use Design verifier app. It gives you some test cases and generates a coverage report, which displays the status of PASSED/FAILED of the objectives in those test cases.
To use Design verifier, go to APPS section in simulink strip, select the mode as Test Generation and Click on Generate Tests.
For more info visit https://www.mathworks.com/help/sldv/index.html?searchHighlight=design%20verifier&s_tid=srchtitle_design%2520verifier_1
Hope this helps!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!