bdIsLibrary

Whether block diagram is a library

Description

example

isLibrary = bdIsLibrary(bdnames) returns whether the loaded block diagrams specified by bdnames are libraries.

Examples

collapse all

Load some block diagrams and get a handle to one of them.

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

Names or handles of loaded block diagrams, specified as a character vector, a cell array of character vectors, a double, or a double array. All character vectors are names of loaded block diagrams. All doubles are handles of loaded block diagrams.

Data Types: char | cell | double

Output Arguments

collapse all

Logical array showing whether block diagrams are libraries, returned as a logical scalar or array (1 for a library, 0 otherwise).

Introduced in R2015a