GUİ edit box setting

조회 수: 16 (최근 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