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: Jeff Sadowski
Subject: Re: format long not working as expected
Date: Thu, 5 Oct 2017 12:22:13 -0600

Thank you

On Wed, Oct 4, 2017 at 3:02 PM, siko1056 <address@hidden> wrote:
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

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave


reply via email to

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