0
$\begingroup$

I want to include a parameter in Simulink.

For example, like the block in the picture. How to use a parameter in the gain and get the output which is L*(input), enter image description herewhich 'L' is only a parameter, like 'sym L' defined in the Matlab script. Don't have a specific value.

I am asking because I want to get the system transfer function using the model built by Simulink. The model in Simulink has some parameters but doesn't have real value. the final answer should be something Like $$\frac{L_1}{s+L_2}$$

$\endgroup$
1
  • $\begingroup$ You cannot use symbolic variables in Simulink, you have to assign a value to your variable L. $\endgroup$ Commented Nov 1, 2022 at 2:36

1 Answer 1

1
$\begingroup$

It depends where the parameter (gain in your case) comes from. If it is a constant/arbitrary signal, then use multiplication instead of gain. If it comes from another SimuLink model, then include it as subsystem, where you may define input and outport ports. If you want to start your model from MatLab, then pass parameters as arguments to the sim command, or more generally use workspace variables.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.