[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
floor()
From: |
John W. Eaton |
Subject: |
floor() |
Date: |
Thu, 28 Sep 2006 13:13:03 -0400 |
On 28-Sep-2006, 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!
What are you using to display the values above? It doesn't look like
Octave's default output format.
Try subtracting 1 from your image and see if maybe the display of the
values is rounding to 1 when they are not really exactly 1.
jwe
- floor(), shoker_17, 2006/09/28
- floor(),
John W. Eaton <=
- Re: floor(), Shai Ayal, 2006/09/28