Simulink constant parameter read inside Matlab Function block
Mostra commenti meno recenti
Hi. I defined some Simulink parameters to the Model Workspace of a Simulink model. When used in a Constant block, the code compiles with no error. When used in a Matlab Function block, I get the 'undefined variable' error.
How can I use global parameters in the Matlab Function block, without having to add an input port for each parameter?
Thanks
3 Commenti
Azzi Abdelmalek
il 12 Ott 2012
your version of Matlab?
Azzi Abdelmalek
il 12 Ott 2012
how many parameters do you have? their size?
River Rock
il 12 Ott 2012
Modificato: River Rock
il 12 Ott 2012
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 12 Ott 2012
Modificato: Azzi Abdelmalek
il 12 Ott 2012
If you have sevral parameters with the same size , you can use one constant block with value
[param1 param2 ... paramn]
1 Commento
River Rock
il 12 Ott 2012
Categorie
Scopri di più su Simulink Functions in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!