Main Content

bdIsLibrary

Determine whether block diagram is a library

Description

example

tf = bdIsLibrary(bd) returns whether the specified block diagram is a library.

Examples

collapse all

Load the MLFB_library and vdp block diagrams. Get the handle for MLFB_library.

load_system({'MLFB_library','vdp'})
h = get_param('MLFB_library','Handle');

Check whether vdp is a library. The returned value 0 indicates that it is not

bdIsLibrary('vdp')
ans = logical
   0

Check whether MLFB_library and vdp are libraries. The returned value shows that MLFB_library is a library and vdp is not.

bdIsLibrary({'MLFB_library','vdp'})
ans = 1x2 logical array

   1   0

Using the handle to MLFB_library, check whether MLFB_library is a library. The value returned shows that it is.

bdIsLibrary(h)
ans = logical
   1

Input Arguments

collapse all

Name or handle of loaded block diagram, specified as a numeric array, string array, character vector, or cell array of character vectors.

Data Types: double | char | string | cell

Output Arguments

collapse all

True or false result, returned as a 1 or 0 of data type logical.

  • 1 (true) — File is a library.

  • 0 (false) — File is not a library.

When multiple files are specified, the function returns a logical array with one entry for each file.

Version History

Introduced in R2015a