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 sf_car, hydlib, and vdp block diagrams. Get the handle for hydlib.

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

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

bdIsLibrary('sf_car')
ans =
	0

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

bdIsLibrary({'hydlib','vdp'})
ans =
1	0

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

bdIsLibrary(h)
ans =
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.

Introduced in R2015a