Error using tf using input from GUI

1 回表示 (過去 30 日間)
llca llasd
llca llasd 2017 年 12 月 28 日
コメント済み: llca llasd 2017 年 12 月 29 日
Hi,
I having issue on using tf function in my program, i was hope to take input from GUI to form a transfer function by using below code, but everytime when i run it, it show "Error using tf (line 248)"
a = get (handles.input1,'string');
b = get (handles.input2,'string');
fs=tf(a,b);

採用された回答

Walter Roberson
Walter Roberson 2017 年 12 月 28 日
I suspect you need
a = str2num( get(handles.input1,'string') );
b = str2num( get(handles.input2,'string') );
fs = tf(a, b);
  3 件のコメント
llca llasd
llca llasd 2017 年 12 月 29 日
thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by