[Top][All Lists]

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

Re: Round function

From: Avraham Rosenberg
Subject: Re: Round function
Date: Tue, 26 Feb 2008 12:20:41 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Feb 26, 2008 at 09:28:53AM +0100, Oscar Bayona Candel wrote:
> Hi all
> I?m trying to use the function round to obtain the nearest number like this:
> so round(4.7)=5 and round(4.2)=4
> What I want is to use (if exists) the round figure but always to the next 
> high number so 
> roundxxx(4.2)=5....exists any function "roundxxx" I mean similar to round 
> that applied gives the next round (high) number? 
> Thanks in advance????
> _________________________________________________________________
> MSN Noticias
> _______________________________________________
> Help-octave mailing list
> address@hidden
Judging by the two examples you gave, I would suggest floor(x+0.5) or
ceil(x-0.5), x being your input.
Cheers, Avraham

Please avoid sending to this address Excell or Powerpoint attachments.

reply via email to

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