Effacer les filtres
Effacer les filtres

how to show Transfer function in gui static text like in command window

4 vues (au cours des 30 derniers jours)
aux = tf(K,conv([L R],[J b]));
T = evalc('aux');
set(handles.TF,'string',num2str(T)); %TF is static text
0.01
------------------------ -----> I want to show like this in static text
0.005 s^2 - 0.04 s - 0.1

Réponse acceptée

Walter Roberson
Walter Roberson le 17 Sep 2023
aux = tf(0.01, [0.005, -0.04, -0.1]);
T = evalc('aux');
Tcell = regexp(T, '\n', 'split');
Tcell = Tcell(4:6);
set(handles.TF, 'string', Tcell);
However, the formatting might not look quite right. If small details such as exactly which characters align vertically matter to you, then you might need to set horizontal alignment or fontname

Plus de réponses (0)

Catégories

En savoir plus sur Large Files and Big Data dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by