Set a complex number(GUI)

I use:
set(handles.edit1,'string',C(1,1));
Where C(1,1)-complex number, example -0.05558+0.020032i , but I see only real part.What to do?

 采纳的回答

set(handles.edit1, 'string', sprintf('%g%+gi', real(C(1,1)), imag(C(1,1)) )

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Desktop 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by