Tf Function keeps running

9 次查看(过去 30 天)
Hello, I've a problem with the use of the tf function. Basically i try to build a tf function using ( s = tf('s') ) and then writing my function. It works only with few poles and zeros (it seems just a total of 4), but when i try to write a function with more poles and zeros, and then i try to run it, it just keeps running. Any solution to this problem?
  6 个评论
Sam Chak
Sam Chak 2022-4-10
Try clear everything and see if the problem persists.
clear all
Alessandro Romeo
Alessandro Romeo 2022-4-10
Oh WOW, finally it runs correctly! Thank you very much!

请先登录,再进行评论。

采纳的回答

Sam Chak
Sam Chak 2022-4-10
I'm glad that the proposed solution works. Just keep in mind that you don't have to clear all every time. You can first check if there is another variable named 's' in the Workspace.
clear all
s = tf('s')
g = 100*(s+10)*(s-5)/(s*(s+8)*(s^2+s+1)*(s-5))
  1 个评论
Alessandro Romeo
Alessandro Romeo 2022-4-10
Oh, I didn't think about that. I will pay attention to this one. Thank you.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dynamic System Models 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by