bdIsLoaded
Determine whether model, subsystem, or library is loaded
Syntax
Description
Examples
Check Whether Models Are Loaded
Check One Model
Open the example. Then, load the vdp
model.
load_system('vdp')
Check whether the vdp
model is loaded.
bdIsLoaded('vdp')
ans = logical
1
The function returns a logical scalar, 1
, which indicates that the model is loaded.
Check Multiple Models
You can check whether multiple models are loaded with a single function call.
Check whether the vdp
and f14
models are loaded. Specify the models to check as a cell array of character vectors.
bdIsLoaded({'vdp','f14'})
ans = 1x2 logical array
1 0
The function returns the logical array [1 0]
, which indicates that the vdp
model is loaded but the f14
model is not loaded.
Input Arguments
bd
— Name of model, subsystem, or library
string array | character vector | cell array of character vectors
Name of model, subsystem, or library, specified as a string array, character vector, or cell array of character vectors.
Blocks, such as Subsystem blocks, cannot be loaded independently. Referenced subsystems can be loaded independently. For more information, see Subsystem Reference.
Data Types: char
| string
| cell
Output Arguments
tf
— True or false result
1
| 0
| logical array
True or false result, returned as a 1
or
0
of data type logical
.
1
(true
) — File is loaded.0
(false
) — File is not loaded.
When multiple files are specified, the function returns a logical array with one entry for each file.
Version History
Introduced in R2008a
See Also
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)