get the Model name which is already opened

93 visualizzazioni (ultimi 30 giorni)
Sukumar Paul
Sukumar Paul il 22 Set 2014
Risposto: Gaganjyoti Baishya il 21 Giu 2020
Would like to know, how to get the model name using Matlab Script which i have already opened. I have a script which finds out the no of Library links those are unresolved. So, when ever i open any model, i want to run the script and get the result for that particular model. Currently, before running the script i need to enter the model name manually.

Risposte (2)

A Jenkins
A Jenkins il 22 Set 2014
>> help gcs
gcs Get the full path name of the current Simulink system.
gcs returns the full path name of the current system. During editing,
the current system is the system or subsystem most recently clicked in.
During simulation of a system containing S-function blocks, the current
system is the system or subsystem containing the S-function block that
is currently being evaluated.
See also gcb, gcbh.
Reference page in Help browser
doc gcs

Gaganjyoti Baishya
Gaganjyoti Baishya il 21 Giu 2020
Hi you can get the opened model by get_param(bdroot, 'Name')

Categorie

Scopri di più su Subsystems in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by