Filter löschen
Filter löschen

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

4 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 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

Weitere Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by