Effacer les filtres
Effacer les filtres

Can a structure variable be updated within MATLAB Function block in Simulink?

3 vues (au cours des 30 derniers jours)
afaq ahmad
afaq ahmad le 15 Sep 2023
I am running a simulation of a physical system in Simlink using a MATLAB function block. In this regard, I have some parameters that are defined in a structure in MATLAB workspace. I passed that structure by defining it as a parameter to the MATLAB function block. However, the code in the block attempts to add more fields to that structure, but the Simulink won't allow me to do that, giving the following error:
new fields cannot be added when structure has been read or used
Is there a way I can dynamically update the structure within the Function block?
Thanks

Réponses (0)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by