Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Hola,
1.) Debe crear un directorio con el nombre que desee. Esto puede ser encuentra dondequiera que usted desee. Si no est en la ruta de acceso estndar MATLAB (utilice el comando path para comprobarlo) utilizar el pathtool para agregar su directorio a la ruta de MATLAB.
2.) Usted pone una copia del archivo slblocks.m en el directorio que usted ha creado. En este archivo se debe adaptar la estructura del navegador. para ejemplo cambiando a: . Navegador (1) Library = 'myBlockLib1'; Browser (1) Nombre = 'myBlockLib1'.; . Navegador (1) IsFlat = 0;
3.) Abrir el navegador biblioteca Simulink (tipo Simulink de Matlab o el botn). All selecciona crear un nuevo modelo. Guardar este modelo vaco como myBlockLib1 si utiliza este libname en 2.) o cualquier otro, pero debe corresponder a la del archivo slblocks.m.
2. 3.
Subject:
How do I add a custom library to the Simulink Library Browser in Simulink 4.1(R12.1)?
Problem Description:
I have created a custom library in Simulink 4.1(R12.1) and would like to add it to the Simulink Library Browser.
Solution:
The ability to add custom libraries to the Simulink Library Browser is available in Simulink 4.1(R12.1). Refer to the documentation link below for more information. http://www.mathworks.com/help/simulink/libraries.html In particular, refer to the "Create Block Libraries" and "Add Libraries to the Library Browser" sections in the documentation. The 'slblocks.m' files shipped with Simulink are commented and explain the necessary modifications. You can view one of these files by typing the following at the MATLAB command prompt:
edit slblocks
Follow the instructions outlined in the 'slblocks.m' file and make changes which apply to your custom library. Here are the general steps to follow: 1. Place each custom library within its own directory. 2. Copy the 'slblocks.m'file into each directory that has one of your libraries. This file is present at the following location. $MATLABROOT/toolbox/simulink/blocks/slblocks.m where $MATLABROOT is the directory where MATLAB is installed and can be known by executing the following command at the MATLAB Comamnd Prompt.
matlabroot
3. In order to add these directories with the custom libraries to the MATLAB path and save them, execute the following commands.
addpath('directory') savepath
4. Make sure that the MATLAB path includes the path to these directories. You can execute the following command at the MATLAB command prompt to find out what directories are on your path.
path
5. Make sure that the name of the customized file is also saved as 'slblocks.m'.
Display a Library in the Library Browser Example of a Minimal slblocks.m File Add More Descriptive Information in slblocks.m
To display a library in the Library Browser, at a minimum you must include these lines (adjusted to describe your library; comments are not required) in the slblocks.m file.
function blkStruct = slblocks % Specify that the product should appear in the library browser % and be cached in its repository Browser.Library = 'mylib'; Browser.Name = 'My Library';
blkStruct.Browser = Browser;
Add More Descriptive Information in slblocks.m
You can review other descriptive information you may wish to include in your slblocks.m file by examining the comments in the Simulinklibrary slblocks.m file: matlabroot/toolbox/simulink/blocks/slblocks.m.