Search code examples
matlabcomplex-numbers

Matlab number formatting?


I'm having some difficulties processing some numbers. The results I get are some like:

0.000093145+1.6437e-011i
0.00009235+4.5068e-009i

I've already try to use format long and as alternative passing to string and then str2num and with no good results also. Although is not being possible to convert them properly as I want (e.g. to a number with 9 decimals) If nobody is able to help me, at least I would appreciate if someone can tell me how to interpret the meaning of the i base.


Solution

  • You are talking about the imaginary unit i. If you are just using real number, you could neglect the imaginary part (it is very small). Thus, try:

    real(0.000093145+1.6437e-011i)