i want to guide edit output has number+text
조회 수: 1 (최근 30일)
이전 댓글 표시
example : set(handles.Z1,'string',Z1) =>> Z1 = j 6561
Z1 value is changeable
ex) x = input value ( but now x = 1)
Z1 = 5 * x * 5
set(handles.Z1.'string',Z1)
=> 25
this value => i wanna 25j
i mean imag value
how to do this output..?
댓글 수: 0
답변 (1개)
Steven Lord
2023년 2월 8일
Like this?
z = uicontrol(Style="edit");
n = 25;
z.String = string(n*1j);
댓글 수: 2
Rik
2023년 2월 13일
Yes, you just need a slightly different syntax and omit the references to the string datatype.
Note that GUIDE does support the syntax Steven posted, but R2015b does not. That is why it is important to include that information.
z = uicontrol('Style','edit');
n = 25;
z.String = num2str(n*1j);
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!