Effacer les filtres
Effacer les filtres

Read BlockType of SimscapeBlocks

3 vues (au cours des 30 derniers jours)
Cedric Götze
Cedric Götze le 12 Juin 2015
Commenté : Cedric Götze le 16 Juin 2015
Hello I try to read some parameters with MATLAB out of my Simulink file. I do so by the following code
load_system(x);
Blocktypes = get_param(find_system(x,'Type','Block'),'BlockType');
But if i use some kind of Simscape Block in Simulink, i get only 'SimscapeBlock' as result. Is it possible to find out which kind of Simscapeblock is used? This ...
load_system(x);
Blocktypes = get_param(find_system(x,'Type','Block'),'Name');
... is no solution because I changed all the original names!
Thanks in Advanced! Cedric

Réponse acceptée

Sebastian Castro
Sebastian Castro le 12 Juin 2015
Looks like the ClassName block parameter might return what you want. For example:
>> get_param(gcb,'ClassName')
ans =
dc_voltage_source
- Sebastian
  1 commentaire
Cedric Götze
Cedric Götze le 16 Juin 2015
Thank You

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Multicore Processor Targets dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by