How to show tf function to text box?

15 vues (au cours des 30 derniers jours)
Hyun Ho Lee
Hyun Ho Lee le 18 Sep 2019
Commenté : Renato Andrango le 15 Sep 2020
num = [str2num(num1) str2num(num2) str2num(num3)];
den = [str2num(den1) str2num(den2) str2num(den3)];
sys = tf(num,den)
set(handles.text1,num2str(sys)

Réponses (1)

Walter Roberson
Walter Roberson le 18 Sep 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 commentaires
Walter Roberson
Walter Roberson le 19 Sep 2019
sys_char = evalc('sys');
Renato Andrango
Renato Andrango le 15 Sep 2020
<3 Thx!

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by