Main Content


Determine whether model is library



tf = bdIsLibrary(sys) returns whether the specified model is a library.


collapse all

Check One Model

Open the example. Then, load the vdp and MLFB_library models.

h1 = 152.0006
h2 = 331.0032

Check whether the vdp model is a library.

ans = logical

The function returns a logical scalar, 0, which indicates that the vdp model is not a library.

Check Multiple Models

You can check whether multiple models are libraries with a single function call.

Check whether the vdp and MLFB_library models are libraries. Specify the models to check as a matrix of handles.

ans = 1x2 logical array

   0   1

Alternatively, specify the models to check as a cell array of character vectors.

ans = 1x2 logical array

   0   1

The function returns the logical array [0 1], which indicates that:

  • The vdp model is not a library.

  • The MLFB_library model is a library.

Input Arguments

collapse all

Name or handle of loaded model, 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