필터 지우기
필터 지우기

How to display polar form in GUI edit text?

조회 수: 2 (최근 30일)
ladybird
ladybird 2017년 8월 6일
댓글: ladybird 2017년 8월 7일
Hi, im new to GUI. I have a simple question.. How to display polar form in GUI edit text?
let say, a=4-2i
set(handles.edit_polar,'string',num2str(a))
so this will display 4-2in in the edit text.. but how to make it displayed in polar form? like this=>(4.47<-26.57) is it possible?
i know how to convert them into magnitude and angle, but how to display them in the gui edit text..
Thanks in advance... :)

채택된 답변

Jan
Jan 2017년 8월 6일
편집: Jan 2017년 8월 6일
a = 4 - 2i;
s = sprintf('(%g %g)', abs(a), angle(a) * 180 / pi);
set(handles.edit_polar, 'string', s);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by