How can I access Simulink/Stateflow chartFileNumber from within a Matlab function?
Afficher commentaires plus anciens
A typical Simulink model file (mdl) with a Stateflow chart looks something like
[..]
Stateflow {
machine {
[..]
}
chart {
[..]
chartFileNumber 1
[..]
}
[..]
}
The contained Stateflow charts have a chartFileNumber property.
I can get access to the Statemachine and Chart objects using the Simulink API.
SL = sfroot;
MDL = SL.find('-isa','Simulink.BlockDiagram');
ch = MDL.find('-isa','Stateflow.Chart'); % give the Chart object
But the chart object does not contain an element representing the chartFileNumber as stored in the mdl-file.
So: How can I access this counter from within an Matlab function (m-file)?
Regards, Jonatan Antoni
2 commentaires
Kaustubha Govind
le 3 Juil 2012
Jonatan: Perhaps you can tell us a little bit about why you need to know that number? Since it is not part of the published API, I would recommend caution in attempting to have code that relies on it. (Personally, I don't know what the significance of that property is, but maybe someone else on this forum will know the answer).
Jonatan Antoni
le 3 Juil 2012
Réponses (0)
Catégories
En savoir plus sur Stateflow dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!