Matlab/simulink: Adding a custom library to the Simulink library Browser
Classification:
Step: 1, create a custom library. In the Simulink Library Browser window, select Menu File | New Library, add the required modules, and save (for example: MYSIMLIB.MDL); 2. Create a new SLBLOCKS.M with the following contents: function blkstruct = slblocks browser.library = ' mysimlib '; Browser.name = ' 00_my_library '; Blkstruct.browser = Browser; Description: * Mysimlib is the filename of the custom library file; * 00_my_library is the name that will be displayed in the Simlink Library Browser window; * Note: Do not add any comments, otherwise it may not succeed, I have suffered a failure (System: Windows XP English, Matlab version: R2010A); 3. Place mysimlib.mdl and SLBLOCKS.M in the same directory; then, in the Matlab main window, Select Menu File | Set path ..., add the directory to the Matlab search path, save, exit; 4. In the Simulink Library Browser window, press the F5 button or select menu View | Refresh Tree view to see the name of the custom library (in this case, 00_my_library) appears in the Library browser.
Add a custom library to the Simulink library Browser