Number formats in Matlab [not to use e symbol]

  • Context: MATLAB 
  • Thread starter Thread starter mech-eng
  • Start date Start date
  • Tags Tags
    Matlab Symbol
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
mech-eng
Messages
826
Reaction score
13
When I write 1.516*10^-5 in Matlab it gives 1.516000000000000e-05 but I do not want to use e symbol. So which format should I use. I could use format bank but it has only two digits. I need more digits. Would you like to help me.

Thank you.
 
Physics news on Phys.org
Here's a list of available formats:

http://www.mathworks.com/help/matlab/ref/format.html

Perhaps, you can tell us what format you're looking for.

In any event, if its not listed you might have to find a custom formatter function or write one yourself.

As an example, if you simply wanted to remove the 'e' from the notation you could convert the displayed number to a string and then adjust the string to replace the 'e' with a ' 10^'
 
Are you writing to a file, or are you wondering about command line display? And how would you like it to appear?
 
mfig said:
Are you writing to a file, or are you wondering about command line display? And how would you like it to appear?

For example: When I do this operation I want it to seem as in a handy scientific calculation with fix is set.
>> 648*0.05^4

ans =

0.004050000000000

>> ans/(128*0.800*40)

ans =

9.887695312500002e-07

When fix is set as 6

The result seems to be 0.000003.

Thank you.