Is it possible to force Simulink to search for library blocks outside of the MATLAB path?

조회 수: 3(최근 30일)
Justin Griffiths
Justin Griffiths 2015년 4월 30일
편집: Sriram Narayanan 2015년 5월 4일
I have a system which takes a library block or model reference block, copies it, modifies it, and places it in a new folder which is guaranteed to be higher on the MATLAB path. This manipulation of the path search process allows for augmentation of a library without actually affecting the original file, which is key for file integrity and file touch detection algorithms.
After the simulation is run these temporary copies are deleted and the folder they were in is removed from the path again. This works fine as long as for every preparation a corresponding clean up is run.
It would be nice to be able to add a temporary virtual path on top of the MATLAB path for a given run of a model. This is similar to the slprj folders auto generated by Simulink but instead of .c source files and object files simulink model files are used.

채택된 답변

Sriram Narayanan
Sriram Narayanan 2015년 5월 4일
편집: Sriram Narayanan 2015년 5월 4일
I understand that you would like to see an option to add a temporary virtual path on top of the MATLAB path that will contain copies of the Simulink libraries and files that you are working on so that the original files are not affected. This is a very specific use case and Simulink does not have the capability to do this. Simulink can only reference files that are on the MATLAB Path.
I have notified the development team about this limitation here at MathWorks and they are looking into adding this functionality in a future release.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by