Create your own library in Simulink

Source: Internet
Author: User

Some of the most commonly used PLL behavior models are mentioned earlier, and in order to facilitate subsequent calls, you can create a library in Simulink to manage it.

The steps are as follows:

New library.

Copy the encapsulated subsystem into the new library and save it. The properties of each module at this point are the default properties when called from browser.

Create a function named BLKSTRUCT.M in the same directory as the. mdl file, as shown in the following. The 3rd line defines the file name of the. MDL, and line 4th defines the display name in browser (where the custom library is preceded by an underscore prefix), and the 5th line indicates whether the next level of the directory is included.

function blkstruct = Slblocks

Browser (1). Library = ' customlib ';
Browser (1). Name    = ' __custom Library ';
Browser (1). Isflat  = 1;% is the This library "flat" (i.e. no subsystems)?

Blkstruct.browser = Browser;

Add the directory where the. mdl file is located to path.

Re-open the Simulink library browser to see the added library.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.