help-octave
[Top][All Lists]
Advanced

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

Re: floor()


From: Shai Ayal
Subject: Re: floor()
Date: Thu, 28 Sep 2006 20:23:01 +0300
User-agent: Thunderbird 2.0a1 (Windows/20060724)

It works for me using the cygwin 0ctave 2.1.73:

GNU Octave, version 2.1.73 (i686-pc-cygwin).
Copyright (C) 2006 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

octave:1> mm=[1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
>  0.996078431372549 0.980392156862745 0.992156862745098 1 1 1 1 1 1 1
> 1 0.556862745098039 0.733333333333333 0.733333333333333 0.733333333333333 0.733333333333333 0.733333333333333 0.737254901960784 0.729411764705882 0.996078431372549
>  1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
>  1 1 1 1 1 1 1 1 1 1
> ];
octave:3> floor(mm)
ans =

  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1
  0  0  0  1  1  1  1  1  1  1
  1  0  0  0  0  0  0  0  0  0
  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1

octave:12> which floor
floor is a built-in function

Are you sure you are using the floor function correctly ?
Shai

shoker_17 wrote:
Octave Version:  2.1.72
Knowledge of Octave: Beginner

############### matrix of an image#######################
1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 0.996078431372549 0.980392156862745 0.992156862745098 1 1 1 1 1 1 1
 1 0.556862745098039 0.733333333333333 0.733333333333333 0.733333333333333
0.733333333333333 0.733333333333333 0.737254901960784 0.729411764705882
0.996078431372549
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
############### matrix of an image#######################

The above matrix was used during image floor() computation. When I used
floor() to round down the decimal values, I got the following result which
is not what I wanted.

############### result#######################
 1 1 1 1 1 1 1 1 1 1
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 1 1 1 1 1 1 1
 1 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 1 1 1 1 1 1 1 1 1 1
 1 1 1 1 1 1 1 1 1 1
 0 0 0 0 0 0 0 0 0 0
############### result#######################

Its not difficult for us to see that the result does not tally with the
original image.
Anyone faced this problem before?? Please enlighten me!!

H E L P!

Shoker




reply via email to

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