How to add relative path file in Simulink Test Manager?

조회 수: 8 (최근 30일)
galaxy
galaxy 2021년 6월 30일
답변: Altaïr 2025년 3월 19일
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

답변 (1개)

Altaïr
Altaïr 2025년 3월 19일
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'))

카테고리

Help CenterFile Exchange에서 Results, Reporting, and Test File Management에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by