Determine whether block diagram is a library
tf = bdIsLibrary(bd)
example
tf = bdIsLibrary(bd) returns whether the specified block diagram is a library.
tf
bd
collapse all
Load the sf_car, hydlib, and vdp block diagrams. Get the handle for hydlib.
sf_car
hydlib
vdp
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.
0
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.
hdlib
bdIsLibrary(h)
ans = 1
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
double
char
string
cell
1
True or false result, returned as a 1 or 0 of data type logical.
logical
1 (true) — File is a library.
true
0 (false) — File is not a library.
false
When multiple files are specified, the function returns a logical array with one entry for each file.
bdIsLoaded | bdroot | find_system
bdIsLoaded
bdroot
find_system