Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Inserting / between two number on set parameter

1 visualización (últimos 30 días)
Jucimar Carpe
Jucimar Carpe el 31 de Mzo. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentario
Jucimar Carpe
Jucimar Carpe el 31 de Mzo. de 2019
Editada: Jucimar Carpe el 31 de Mzo. de 2019
Now it's working...
set(handles.tensao_VA,'String',sprintf('%g %s %g', abs(VA_fase), '/', (180*angle(VA_fase))/pi))
Chears!

Respuestas (0)

Productos


Versión

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by