Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 17 Set 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

Più risposte (0)

Categorie

Scopri di più su Large Files and Big Data in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by