Error using tf using input from GUI

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);

 Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Dic. de 2017
I suspect you need
a = str2num( get(handles.input1,'string') );
b = str2num( get(handles.input2,'string') );
fs = tf(a, b);

3 comentarios

llca llasd
llca llasd el 28 de Dic. de 2017
Thanks, it solve the error.
do you have any idea if i want to perform inverse Laplace to the fs which code show i use? as i try ilaplace it show error: Error in Laplace_Calculator>pushbutton1_Callback (line 86) ft = ilaplace(fs);
llca llasd
llca llasd el 29 de Dic. de 2017
thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 28 de Dic. de 2017

Comentada:

el 29 de Dic. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by