Displaying a user-defined library in the simulink library browser

1 visualización (últimos 30 días)
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!

Respuesta aceptada

Kaustubha Govind
Kaustubha Govind el 1 de Jul. de 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 comentario
Jill
Jill el 1 de Jul. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Debugging and Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by