Can I call variables from a mask dialogue box in an Embedded MATLAB function block without having to connect variable blocks
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm looking to use an Embedded MATLAB Function block to calculate two output variables based on a selection of user inputs into the dialogue box.
I've chosen the Embedded MATLAB Function block due to an S-Function block seeming complicated.
As the function is developing the number of inputs to the block is becoming unwieldy, since I'm connecting constant blocks declaring the variables explicitly and connecting them. Is there a simpler way?
0 个评论
采纳的回答
Kaustubha Govind
2012-9-11
编辑:Rik
2019-10-25
Yes, you can convert your inputs to parameters (whose names must match that of the workspace variables). You simply need to change the "Scope" from Input to Parameter on the Ports and Data Manager.
4 个评论
Walter Roberson
2019-10-25
https://www.mathworks.com/help/simulink/ug/ports-and-data-manager.html is probably a better link
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Naming Conventions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!