How to display a complex number in edit in GUI?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Doug Hull
el 18 de Nov. de 2013
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 comentarios
Abdelrahman Yousri
el 28 de Dic. de 2020
Since B is a number type, you should make it string type so try this >> set(handles.B, 'String', ({num2str(B)}));
0 comentarios
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!