Contenuto principale

slreportgen.utils.isModelLoaded

R2026b

Check if model is loaded

Description

tf = slreportgen.utils.isModelLoaded(model) tests whether the input Simulink® model is loaded into memory.

example

Examples

collapse all

Check whether the sf_car model is loaded into memory. The slreportgen.utils.isModelLoaded function returns 1 (true) because the model is loaded.

openExample("sf_car")
tf = slreportgen.utils.isModelLoaded("sf_car")
tf = logical
   1

Input Arguments

collapse all

Model to check for being loaded, specified as a string scalar or character array of the model path.

Output Arguments

collapse all

Whether input model is loaded into memory, returned as 1 (true) if the input model is loaded. Otherwise, it returns 0 (false).

Version History

Introduced in R2018b