Displaying a user-defined library in the simulink library browser

1 view (last 30 days)
Hello,
I believe this question is simple and I am just misinterpretting something in the documentation. I have created my own library called PackNTxLib. I would like to add it to the Library Browser. I followed the product documentation and it isn't working so I must have misinterpreted something in the documentation. I did the following: 1. Under My MatLab directory (i.e. My Documents/<myusername>/MatLab) I created a folder called PackNTxLib. 2. In that folder I added my model library (PackNTxLib.mdl) 3. In that folder I created an slblock.m file that contains the following: function blkStruct = slblocks Browser.Library = 'PackNTxLib'; Browser.Name = 'Pack N Transmit'; blkStruct.Browser = Browser;
I have run the file and get no errors. Then I bring up the simulink library browser and my library isn't there. Am I supposed to look somewhere else? Am I missing something in my .m file? Do I have my folder in the wrong place? I figure this is something simple I am doing wrong. Thanks!

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 1 Jul 2011
Have you added My Documents/<myusername>/MatLab/PackNTxLib to the MATLAB path? Once you have done that, run:
which -all slblocks
And make sure that your slblocks.m shows up in the list.
  1 Comment
Jill
Jill on 1 Jul 2011
Yes, I have added the path to my MATLAB path. When I type the "which" command, my slblocks.m file is not listed. All the files that are listed are under c:\Program Files\MATLAB.... Not anything from My Documents directory.

Sign in to comment.

More Answers (0)

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!