How to force a Simulink Function to re-use the same argument for Input/Output

I am creating a Simulink Function and want it to reuse the same argument for both input and output variables. 

How can I do this?

 Accepted Answer

This can be accomplished by assigning identical names to both the input and output arguments of a Simulink function. Please see the following for an example:
With the inside of the Simulink Function looking like this:
For more information on Simulink Functions please refer to the following documentation:

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Release

R2023a

Community Treasure Hunt

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

Start Hunting!