MATLAB: What does s = tf (‘s’) do

pid transfer

I am currently doing an exercise in PID control, the first line in the code is
s = tf ('s');
What does it do? according to Mathworks website:
sys = tf(M) creates a static gain M (scalar or matrix)
from what I know that tf is supposed to create a transfer function with a denominator and numerator. what does static gain mean?

Best Answer

Using:
s = tf('s');
allows you to enter the transfer function in the next line in symbolic form rather than as numerator and denominator vectors. You can easily recover the numerator and denominator vectors from the system object created:
s = tf('s');
sys = (244.2*s + 244.2) / (0.015*s^4 + 1.525*s^3 + 2.51*s^2 + 245.2*s + 1221);
num = [sys.Numerator{:}]
den = [sys.Denominator{:}]
num =
0 0 0 244.2 244.2
den =
0.015 1.525 2.51 245.2 1221