How do I add a custom library to the Simulink Library Browser in Simulink 4.1(R12.1)?
조회 수: 37 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2013년 3월 7일
편집: MathWorks Support Team
2021년 11월 16일
I have created a custom library in Simulink 4.1(R12.1) and would like to add it to the Simulink Library Browser.
채택된 답변
MathWorks Support Team
2021년 12월 30일
편집: MathWorks Support Team
2021년 11월 16일
The ability to add custom libraries to the Simulink Library Browser is available in Simulink 4.1(R12.1). Refer to the documentation link below for more information.
In particular, refer to the "Create Block Libraries" and "Add Libraries to the Library Browser" sections in the documentation.
The 'slblocks.m' files shipped with Simulink are commented and explain the necessary modifications. You can view one of these files by typing the following at the MATLAB command prompt:
edit slblocks
Follow the instructions outlined in the 'slblocks.m' file and make changes which apply to your custom library.
Here are the general steps to follow:
1. Place each custom library within its own directory.
2. Copy the 'slblocks.m'file into each directory that has one of your libraries. This file is present at the following location.
$MATLABROOT/toolbox/simulink/blocks/slblocks.m
where $MATLABROOT is the directory where MATLAB is installed and can be known by executing the following command at the MATLAB Comamnd Prompt.
matlabroot
3. In order to add these directories with the custom libraries to the MATLAB path and save them, execute the following commands.
addpath('directory')
savepath
4. Make sure that the MATLAB path includes the path to these directories. You can execute the following command at the MATLAB command prompt to find out what directories are on your path.
path
5. Make sure that the name of the customized file is also saved as 'slblocks.m'.
댓글 수: 1
Jan
2018년 1월 12일
@Victor: "Adding a custom library to the Simulink Library Browser in Simulink 4.1(R12.1)" is a very specific task and it requires some experiences to understand it. I think, you need a certain expert level to reconsider this and "layman terms" are not as clear as using the standard terms of Matlab and Simulink.
Do you have a question to a specific sentence? If so, posting them in the comments would be useful.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!