GUİ edit box setting

18 Ansichten (letzte 30 Tage)
Erdem Aktürk
Erdem Aktürk am 10 Dez. 2022
Kommentiert: Rik am 10 Dez. 2022
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 Kommentare
Image Analyst
Image Analyst am 10 Dez. 2022
GUIDE or App Designer?
Erdem Aktürk
Erdem Aktürk am 10 Dez. 2022
Guide

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 10 Dez. 2022
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 Kommentar
Rik
Rik am 10 Dez. 2022
Just a sidenote: this will automatically convert the string vector to a cellstr.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by