How can you convert a scientific number to decimal?

2 vues (au cours des 30 derniers jours)
vatankhah
vatankhah le 9 Août 2013
I have an equation in matlab that gave me this result:
4.1084e+001 -9.6671e+002i
how can I convert it to a decimal number?
  1 commentaire
Daniel Shub
Daniel Shub le 9 Août 2013
Do you mean something like format longg?

Connectez-vous pour commenter.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 9 Août 2013
Modifié(e) : Azzi Abdelmalek le 9 Août 2013
a=4.1084e+001-9.6671e+002i
out=sprintf('%.2f+%.2fi',real(a),imag(a));
out=strrep(out,'+-','-')
  1 commentaire
Azzi Abdelmalek
Azzi Abdelmalek le 9 Août 2013
[vatankhah comented]
It was useful Thanks for your help

Connectez-vous pour commenter.

Plus de réponses (1)

Matt J
Matt J le 9 Août 2013
If you want MATLAB to display its results differently, use the FORMAT command.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by