help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: format long not working as expected


From: siko1056
Subject: Re: format long not working as expected
Date: Wed, 4 Oct 2017 14:02:19 -0700 (MST)

Jeff Sadowski wrote
> I'm using octave 4.0.0 on ubuntu 16.04
> when I do
> 
>>> format long
>>> h=10.^(-15:-1)
> h =
> 
>  Columns 1 through 6:
> 
>    1.00000000000000e-15   1.00000000000000e-14   1.00000000000000e-13
>  1.00000000000000e-12   1.00000000000000e-11   1.00000000000000e-10
> 
> [...]
> 
> The expected is like matlabs
> 
>>> format long
>>>  h=10.^(-15:-1)
> 
> h =
> 
>   Columns 1 through 4
> 
>    0.000000000000001   0.000000000000010   0.000000000000100
>  0.000000000001000
> 
> [...]

Maybe you give `fixed_point_format` [1] a try:

>> format long
>> fixed_point_format (true)
>> h=10.^(-15:-1)

HTH,
Kai

[1]:
https://www.gnu.org/software/octave/doc/v4.0.0/XREFfixed_005fpoint_005fformat



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]