Avoiding scientific notation with Matlab

I already tried:

format long g; 

But a number like this has a scientific notation:

 ans = 8.80173259769825e-05 

How can I avoid scientific notation without using something like fprintf ?

+4
source share
2 answers

you can use:

 sprintf('%.10f', yourNumber) 

Or a more complicated option is to use Java-based formatting ( see additional information , Yair Altman credit for showing this method), for example:

 char(java.text.DecimalFormat('#.00000000').format(yourNumber)); 
+5
source

Follow the link: Preferences> Command Type> Number Format> Bank

0
source

All Articles