How to add relative path file in Simulink Test Manager?

8 visualizzazioni (ultimi 30 giorni)
galaxy
galaxy il 30 Giu 2021
Risposto: Altaïr il 19 Mar 2025
Hi all,
I use Simulink Test Manager for model testing.
But when copy test project folder to other path or other PC, we need to change path of test file.
ex: Input test file
So, I want to ask how to fix this problem?
Thank you so much

Risposte (1)

Altaïr
Altaïr il 19 Mar 2025
Hey @galaxy,
Using a MATLAB project is an elegant approach for organizing work. A project can be created from a folder using the "From Folder" option.
In the subsequent steps, the wizard allows configuration of folders to be added to the path when the project opens and removed when it closes. The project also supports startup and shutdown scripts.
Create a project with all the files to be shared, and add all the necessary folders to the path using the wizard. This setup allows specifying just the input file name instead of the full path as shown below.
Alternatively, the PRE-LOAD callback can be used for each test case.
More details can be found in this MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/2137798
To access the documentation for MATLAB projects, use the following command:
web(fullfile(docroot, 'matlab/projects.html'))

Categorie

Scopri di più su Results, Reporting, and Test File Management in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by