How can I programmatically set the "analysis mode" of the "machine environment" block in a Simulink model based on SimMechanics using a Matlab script?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I'd like to write a Matlab script that allows me to programmatically set the "analysis mode" of the "machine environment" block in my SimMechanics based model. I'll be switching between the "trimming" and "forward dynamics" settings.
Is this possible to do in an .m file?
0 Commenti
Risposte (2)
Sebastian Castro
il 8 Dic 2015
Yes, you can use the following syntax:
>> blockName = 'myModel/Machine Environment';
>> type = get_param(blockName,'AnalysisType');
>> set_param(blockName,'AnalysisType','Trimming');
>> set_param(blockName,'AnalysisType','Forward Dynamics')
- Sebastian
0 Commenti
Vedere anche
Categorie
Scopri di più su Discontinuities in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!