Can I call variables from a mask dialogue box in an Embedded MATLAB function block without having to connect variable blocks

7 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Kaustubha Govind
Kaustubha Govind il 11 Set 2012
Modificato: Rik il 25 Ott 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 Commenti

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by