In Matlab, when printing using e
such as fprintf('%10.5e\n', pi/100)
one will get the result to be 3.14159e-02
. However, what if I want the number to have a leading zero such as 0.314159e-1
? How can I manage this with Matlab?
The reason I ask is that I am trying to print to a file which I need to have leading zeros. Otherwise, I would not care.
Thanks.