Loading... ## 选择新建空白库,保存在自定义文件夹中,命名为mylib.slx。(名字可以随便起,但是要和下面脚本对应上) ![](https://fangshirui.cn/usr/uploads/2019/11/725762369.png) ## 在新建一个脚本文件,命名为slblocks.m ```bash function blkStruct = slblocks % This function specifies that the library should appear % in the Library Browser % and be cached in the browser repository Browser.Library = 'mylib'; % 'mylib' is the name of the library Browser.Name = 'My Library'; % 'My Library' is the library name that appears % in the Library Browser blkStruct.Browser = Browser; ``` ![](https://fangshirui.cn/usr/uploads/2019/11/923834553.png) ## 设置路径,将库存放的文件夹,添加到matlab搜索路径中, ![](https://fangshirui.cn/usr/uploads/2019/11/901205485.png) ## 在simulink library browser中刷新所有库文件。 ![](https://fangshirui.cn/usr/uploads/2019/11/3970012274.png) ## 此时就可以看到自己自定义的库了 ![](https://fangshirui.cn/usr/uploads/2019/11/3398364585.png) 最后修改:2019 年 11 月 10 日 01 : 50 PM © 允许规范转载