How can I enter a transfer function without writing down the exponents?

1 回表示 (過去 30 日間)
DdeR
DdeR 2018 年 10 月 25 日
編集済み: DdeR 2018 年 10 月 25 日
Is there a possibility to enter transfer functions like this one:
without writing out the exponent?
I know that it could be inserted as:
num=[35 3.5 8.75];
den=[100 25 100.24 1];
sys=tf(num,den)
but writing out equations could be time consuming so is there a faster way?

採用された回答

Stephan
Stephan 2018 年 10 月 25 日
編集済み: Stephan 2018 年 10 月 25 日
Hi,
i think you made a mistake by multiplying the denumerator - When i calculate by hand i get:
num=[35 3.5 8.75]
den = [100 25 100.24 1]
For your purposes you could tryout conv function - it multiplies 2 polynomials:
num1 = [8.75];
num2 = [4 0.4 1];
den1 = [100 1];
den2 = [1 0.24 1];
sys = tf(conv(num1,num2),conv(den1,den2))
sys =
35 s^2 + 3.5 s + 8.75
------------------------------
100 s^3 + 25 s^2 + 100.2 s + 1
Continuous-time transfer function.
Best regards
Stephan

その他の回答 (1 件)

dpb
dpb 2018 年 10 月 25 日
num=8.75*[4 0.4 1];
den=conv([100 1]),[1 0.24 1]);
convolution of polynomial coefficient vectors is same as multiplication. NB: the hand multiplication above for the denominator is in error; the actual answer is
>> conv([100 1],[1 0.24 1])
ans =
100.0000 25.0000 100.2400 1.0000
>>

カテゴリ

Help Center および File ExchangeTime and Frequency Domain Analysis についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by