Can I call variables from a mask dialogue box in an Embedded MATLAB function block without having to connect variable blocks
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Diarmaid
el 11 de Sept. de 2012
Comentada: Walter Roberson
el 25 de Oct. de 2019
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 comentarios
Respuesta aceptada
Kaustubha Govind
el 11 de Sept. de 2012
Editada: Rik
el 25 de Oct. de 2019
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 comentarios
Walter Roberson
el 25 de Oct. de 2019
https://www.mathworks.com/help/simulink/ug/ports-and-data-manager.html is probably a better link
Más respuestas (0)
Ver también
Categorías
Más información sobre Naming Conventions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!