MATLAB Answers

Add parameters in transfer function

12 views (last 30 days)
John Blacksad
John Blacksad on 8 Apr 2020
Answered: Star Strider on 8 Apr 2020
Hello, I need a transfer function like this: 1/(k_s*s^2+1)
But I get an error message and then I can't solve the feedback. How can I do it?
Thank you in advance.

  1 Comment

Ameer Hamza
Ameer Hamza on 8 Apr 2020
In MATLAB, the transfer function cannot have variable coefficients. Can you explain what are you trying to do?

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 8 Apr 2020
The ‘H’ transfer function and the feedback output function can be anonymous functions:
G = tf(1, [2 0 1])
H = @(k_s) tf(1, [k_s 0 1])
GH = @(k_s) feedback(G,H(k_s))
ks = 0.25;
step(GH(ks))
That runs without error in R2020a.

  0 Comments

Sign in to comment.

Sign in to answer this question.