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!