help-octave
[Top][All Lists]
Advanced

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

Re: programing how many digits.


From: Andy Buckle
Subject: Re: programing how many digits.
Date: Fri, 10 Sep 2010 06:24:24 +0100

On Fri, Sep 10, 2010 at 4:42 AM, insipido <address@hidden> wrote:
> how can I define how many digits in my results i wanta, like 2+2 =
> 4.0000 or 2+2 = 4.0 what is the instruction to do this in octave
>
> thanks
>
> vic.

As well as setting format long, if you want to see a few numbers with
a different number of decimal places you can do this sort of thing.

printf("%.10f\n",1/3)

-- 
/* andy buckle */


reply via email to

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