小白,研究了好几天才弄明白。。。
第一步,建库。
第二步,保存库,并记下保存的位置,有说要保存到matlab目录下的,所以就选择在matlab安装目录下新建文件夹。
第三步,
先单击save,再单击close。
复制一下脚本并新建脚本到新建的库文件所在的文件夹,并命名为slblocks.m。
function blkStruct = slblocks
% This function specifies that the library should appear
% in the Library Browser
% and be cached in the browser repository
Browser.Library = ‘mylibraryy’;%文件名
% ‘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;
新建完,保存并运行。就OK了。
如果没有显示。下面窗口红色框框框起来的附近右击,会出现红色框框框起的内容,然后选择第二个,刷新下库。然后在箭头指的位置会出来一个FIX,单击FIX,然后选择第二个选项。等刷新和重建完成。新的库就出来了。
matlab2017a如何添加自己建的库
最新推荐文章于 2024-05-23 16:52:41 发布