[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: negative indeces found by "find"
From: |
David Bateman |
Subject: |
Re: negative indeces found by "find" |
Date: |
Tue, 26 Oct 2010 22:25:23 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
Levente Torok wrote:
> Hi David,
>
> This seems to be an index overflow.
> I uploaded the matrix here:
> <URL deleted
> Let me know if you have downloaded. I need to delete it.
>
> Thanks,
> Lev
>
Ok I've downloaded the file and I can reproduce this, but its not a bug
as such... The issue is that the size of the matrix is 101970 by 333596
and 101970*333596 is greater than 2^31 which is the larger integer index
that octave can use. So you are seeing an integer overflow.
You have two choices. Build a 64-bit version of Octave (search the list
for how to do this) or if you instead index with
[inx, iny] = find(docByWordsS);
instead the individual indices will be smaller than 2^31.. Note however
that you still might have some issues with such a large matrix without a
64-bit version of Octave, as some operations and functions might index
the matrix with a single index triggering the same issue.
D.