MATLAB: How can i use the output of a function block just as a gain

gainmatlab functionsimulink

Dear all,
I calculate PI parameters which are Kc, Ti in a function block. But later, I want them to use just as gain block. How can i do this? As you know, i can only use the output part of the fcn block. Can i use the calculated variable just like a gain? Thanks.

Best Answer

Use a Multiply block from the 'Math Operations' library. One input is the signal that needs to be increased in magnitude. The other input is the gain value from the MATLAB Function block.
Please note that the multiply block is listed as 'Divide' in the library.
Related Question