MATLAB Answers

1

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

Asked by Diarmaid on 11 Sep 2012
Latest activity Commented on by Walter Roberson
on 25 Oct 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 Comments

Sign in to comment.

1 Answer

Answer by Kaustubha Govind on 11 Sep 2012
Edited by Rik
on 25 Oct 2019
 Accepted Answer

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 Comments

Show 1 older comment
Kaustubha, I don't know what happened to your link: Ports and Data Manager, it should be

Sign in to comment.