Hi,

I'm working on my dissertation and I have come across a crazy quirk

in MATLAB that I was willing to write off before but has happened

twice now and it's REALLY starting to make me angry.

I am trying to group some row vectors based on the value in their

first column. Simple enough, right? Here's the snippet of code I'm

working with:

now, when I run the program, i get the following outputs:Quote:> [ratio cutoff{cut}]

> if (ratio <= cutoff{cut}) & (ratio > cutoff{cut} - 0.1)

> disp('OK!')

ans =

0.3000 0.3000

ans =

0.3000 0.3000

ans =

0.2000 0.3000

OK!

ans =

0.4000 0.3000

and so on. The correct value of ratio NEVER sets off the condition,

but the incorrect value always does. The plot thickens:

ans =

0.2000 0.2000

OK!

ans =

0.4000 0.4000

OK!

I have tried everything I can think of, and as ridiculous as it may

seem, it appears to me that some MATLAB functions are actually

incapable of recognizing the number 0.3 correctly. As I mentioned, I

had a similar problem about a month ago, with a very similar line of

code and again, the problem value was 0.3. I have messed around with

some other commands using that value, like adding and subtracting it,

using find to seek out that value in a matrix, and it works just

fine.

Please help me, if anyone has ever heard of such an unusual problem,

please let me know. I haven't seen it listed in any troubleshooting

notices or bug reports. I am not an idiot, I have been programming

MATLAB for about two years so I'm pretty confident in my abilities,

and I am positive I have not made a mistake. I am becoming EXTREMELY

angry, though, like I don't have enough else to worry about without a

piece of mathematical software that CAN'T RECOGNIZE A NUMBER!!

Maybe it's even a processor problem? Any help would be greatly

appreciated. Thanks.

Mark