Simulink constant parameter read inside Matlab Function block
33 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 12 Oct 2012
Edited: Azzi Abdelmalek
on 12 Oct 2012
If you have sevral parameters with the same size , you can use one constant block with value
[param1 param2 ... paramn]
See Also
Categories
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!