Why my - tf2sym - command is not working?
13 ビュー (過去 30 日間)
古いコメントを表示
Hello, i am trying to do my homework but my tf2sym command is not working.
İt says "Unrecognized function or variable 'tf2sym'."
What can i do about it?
I looked to add-ons and i have all toolboxes currently, it shows. Please can someone help me?
Gs=tf(1,[1 10 27 18]);
Gss= tf2sym(Gs)
0 件のコメント
回答 (2 件)
Sam Chak
2023 年 11 月 19 日
I guess you want to convert the transfer function to state-space nodel.
Gs = tf(1, [1 10 27 18])
%% Method 1: Using tf2ssm()
[A, B, C, D] = tf2ssm(1, [1 10 27 18])
%% Method 2: Directly using ss() function
Gss = ss(Gs)
0 件のコメント
Star Strider
2023 年 11 月 19 日
If you want to conovert that transfer function to a symbolic variable, try this —
Gs=tf(1,[1 10 27 18]);
Gss= tf2sym(Gs)
whos Gss
function symtf = tf2sym(sys)
TF = tf(sys);
n = TF.Numerator;
d = TF.Denominator;
s = sym('s');
symtf = poly2sym(n,s) / poly2sym(d,s);
end
I can find no reference to any function called ‘tf2sym’ so I created one.
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Stability Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!