Simulink constant parameter read inside Matlab Function block

2 次查看(过去 30 天)
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

采纳的回答

Kaustubha Govind
Kaustubha Govind 2012-10-12
My answer to this previous question should work for you.

更多回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2012-10-12
编辑:Azzi Abdelmalek 2012-10-12
If you have sevral parameters with the same size , you can use one constant block with value
[param1 param2 ... paramn]

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by