Matlab %e meaning

216 Views Asked by At

What does %e mean in matlab? I.e:

x = %1.25e

I know if you put an e at the end it adds 0s, so does it have something to do with that?

1

There are 1 best solutions below

0
On

The % sing in matlab is used as a comment. The line

x = %1.25e

doesn't work since it is the same as writing only

x = 

I think you mean the usage of %e when formatting strings:

fprintf('%e',5)

which will print the number 5 in eponenial notation. Further informations on format specification you can get by typing doc fprintf in your matlab console.