GUİ edit box setting

3 ビュー (過去 30 日間)
Erdem Aktürk
Erdem Aktürk 2022 年 12 月 10 日
コメント済み: Rik 2022 年 12 月 10 日
I found an answer which is in the sym type.I need to convert it to the string type in order to put it in a edit box in GUI.
How can I do that?
  2 件のコメント
Image Analyst
Image Analyst 2022 年 12 月 10 日
GUIDE or App Designer?
Erdem Aktürk
Erdem Aktürk 2022 年 12 月 10 日
Guide

サインインしてコメントする。

採用された回答

Jan
Jan 2022 年 12 月 10 日
syms x
eq = sin(x) == pi/2;
sol = solve(eq);
s = string(sol);
s = 2×1 string array
"asin(pi/2)" "pi - asin(pi/2)"
set(HandleOfTheEditField, 'String', s)
  1 件のコメント
Rik
Rik 2022 年 12 月 10 日
Just a sidenote: this will automatically convert the string vector to a cellstr.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by