matlab values returned by getparam ara all considered as string
Afficher commentaires plus anciens
I have a simulink model from which i import the parameters value in my workspace. Then i want to check if they are either numeric or not so i use the isnumeric function but it says to me that none of the parameters value are numeric because with the get_param any number is considered as a string. So if anyone know of a way to acces the value simulink parameters other than get_param it will be helpfull.
2 commentaires
Fangjun Jiang
le 28 Oct 2022
Modifié(e) : Fangjun Jiang
le 28 Oct 2022
I am curious what is the purpose of your isnumeric() call. Imagine the gain value of the Gain block is '1.1', or 'MyGain', where 'MyGain' is a variable in the workspace. What do you expect get_param('GainBlock','gain') to return to you and what is your next step?
If you state your need or task, there might be a different way.
Ali
le 2 Nov 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programmatic Model Editing 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!