Error using tf using input from GUI

5 Ansichten (letzte 30 Tage)
llca llasd
llca llasd am 28 Dez. 2017
Kommentiert: llca llasd am 29 Dez. 2017
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);

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 28 Dez. 2017
I suspect you need
a = str2num( get(handles.input1,'string') );
b = str2num( get(handles.input2,'string') );
fs = tf(a, b);
  3 Kommentare
llca llasd
llca llasd am 29 Dez. 2017
thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by