Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding Libraries to the Library Browser?

11 views
Skip to first unread message

Thai LeXuan

unread,
May 11, 2009, 5:33:02 AM5/11/09
to
Dear all
I have just created an custom library named "MyLibary.mdl". And I want to Addi My Libraries to the Library Browser. I read online document here:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/brkl0a6-1.html
and it gives me some steps below:
1. Create a directory in the MATLAB path for the top-level library and its sublibraries.
2. Create or copy the top-level library and its sublibraries into its directory.
3. Create a copy of the matlabroot/toolbox/simulink/blocks/slblocks.m file in the library's directory.
I created "C:\Program Files\MATLAB704\toolbox\simulink\blocks\Mylibrary" for store fiile "Mylibrary.mdl" and "file slblocks.m"
4.Edit the file as necessary to specify the name, open function, mask, and structure of your library.
I have edited "slblocks.m " as decribed in the example

function blkStruct = slblocks

%SLBLOCKS Defines a block library.

blkStruct.Name = ['My' sprintf('\n') 'Library'];

blkStruct.OpenFcn = 'mylib';

blkStruct.MaskDisplay = '';

% End of blocks

But when I open Library browser. I can't see "MyLibrary" in Library Browser?
Where am I wrong ? Could you give me an explaination?

Thanks a lot !!

Titus Edelhofer

unread,
May 11, 2009, 6:08:18 AM5/11/09
to

"Thai LeXuan" <xuan...@vtv.org.vn> schrieb im Newsbeitrag
news:gu8rce$5t8$1...@fred.mathworks.com...

Hi,
the directory where the library is, must be on the MATLAB path, is this the
case?

Titus


Yann

unread,
May 14, 2009, 8:26:02 AM5/14/09
to

I guess the open function should be
blkStruct.OpenFcn = 'MyLibary'; instead of blkStruct.OpenFcn = 'mylib';

try this,
Yann

"Thai LeXuan" <xuan...@vtv.org.vn> wrote in message <gu8rce$5t8$1...@fred.mathworks.com>...

0 new messages