Azzera filtri
Azzera filtri

Looking for a function to get Number and Names of Input/Output from a model

2 visualizzazioni (ultimi 30 giorni)
Hello,
I'm would get with a matlab function all the input and the output names of a specified model. I'm pretty sure I've seen a function like that but I didn't find it. I know I can do my job with MDLInfo but it is not very optimized for my application.
Hope someone could have my answer.
Thanks !

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 24 Mag 2022
If the Inport/Outport block names are good enough,
blks=find_system('ModelName','FindAll','On','SearchDepth',1,'BlockType','Inport')
get(blks,'Name')
length(blks)
More elaborated codes are needed if you want the signal line names (but some of them could be empty)
  1 Commento
Adrien GOEPPEL
Adrien GOEPPEL il 24 Mag 2022
For my application, the Inport/Output name are good enough. It fits perfectly with my application. Thanks a lot !

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by