Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Inserting / between two number on set parameter

조회 수: 1 (최근 30일)
Jucimar Carpe
Jucimar Carpe 2019년 3월 31일
마감: MATLAB Answer Bot 2021년 8월 20일
HI everybody,
I want to insert '/' between a complex number that will be set in a gui. Today the code is:
set(handles.tensao_VA,'String',sprintf('%g%+gi', real(VA_fase), imag(VA_fase)))
This above code give me a complex number in the orthogonal way, but i want to show in the way Abs/ang.
How can insert '/' between theses number?
In my mind i need to do:
set(handles.tensao_VA,'String',sprintf('%g%+gi', abs(VA_fase),'/',[(180*angle(VA_fase)/pi)]))
But it's not working...
  댓글 수: 1
Jucimar Carpe
Jucimar Carpe 2019년 3월 31일
편집: Jucimar Carpe 2019년 3월 31일
Now it's working...
set(handles.tensao_VA,'String',sprintf('%g %s %g', abs(VA_fase), '/', (180*angle(VA_fase))/pi))
Chears!

답변 (0개)

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by