フィルターのクリア

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

4 ビュー (過去 30 日間)
Navamin Poomkasem
Navamin Poomkasem 2023 年 9 月 17 日
回答済み: Walter Roberson 2023 年 9 月 17 日
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

採用された回答

Walter Roberson
Walter Roberson 2023 年 9 月 17 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by