How to show tf function to text box?

num = [str2num(num1) str2num(num2) str2num(num3)];
den = [str2num(den1) str2num(den2) str2num(den3)];
sys = tf(num,den)
set(handles.text1,num2str(sys)

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Sept. de 2019
sys_char = evalc(sys);
sys_cell = splitlines(sys_char);
sys_cell = sys_cell(2:end-2); %some useless empty lines
set(handles.text1, 'Max', 2, 'FontName', 'mono', 'String', sys_cell);

3 comentarios

Hyun Ho Lee
Hyun Ho Lee el 19 de Sept. de 2019
thank you! but error occured..
message is "input of evalc is not string or vector of char"
sys_char = evalc('sys');
Renato Andrango
Renato Andrango el 15 de Sept. de 2020
<3 Thx!

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Sept. de 2019

Comentada:

el 15 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by