How to display a complex number in edit in GUI?
조회 수: 4 (최근 30일)
이전 댓글 표시
As in the question, I use
set(handles.B ,'String',B );
to display a complex number in an edit, but it seems only real part are displayed. How can I display a complex number like
a+ib
in an edit box?
댓글 수: 0
답변 (2개)
Doug Hull
2013년 11월 18일
Make a second edit box right next to it that only displays the imaginary part and is labeled with an i (or j if you are that type)
댓글 수: 0
Abdelrahman Yousri
2020년 12월 28일
Since B is a number type, you should make it string type so try this >> set(handles.B, 'String', ({num2str(B)}));
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!