Number formats in Matlab [not to use e symbol]

  • MATLAB
  • Thread starter mech-eng
  • Start date
  • #1
760
11

Main Question or Discussion Point

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.
 

Answers and Replies

  • #2
11,499
5,042
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^'
 
  • #3
275
95
Are you writing to a file, or are you wondering about command line display? And how would you like it to appear?
 
  • #4
760
11
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.
 

Related Threads on Number formats in Matlab [not to use e symbol]

  • Last Post
Replies
4
Views
16K
Replies
3
Views
15K
Replies
1
Views
5K
Replies
1
Views
813
Replies
1
Views
11K
Replies
4
Views
3K
Replies
6
Views
673
  • Last Post
Replies
5
Views
3K
Replies
7
Views
906
Top