octave-maintainers
[Top][All Lists]
Advanced

[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 21:29:08 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Levente Torok wrote:
> Hi Guys,
>
> I have a sparse matrix docByWordsS.
> octave:30> size(docByWordsS)
> ans =
>
>    101970   333596
>
> octave:31> inx=find( docByWordsS );
> octave:32> length(find(inx < 0))
> ans =  228061
>
> octave:33> version % ubuntu
> ans = 3.2.3
>
>
> Have you already dealt with this thing?
>
> Thanks,
>
> Lev
>
>   
With the script

n = 5e3; d = 1e-2;
for i = 1:100
  s = sprand(n,n,d);
  inx = find(s);
  if (length(find(s<0)) != 0)
    error ("shouldn't happen");
  endif
endfor

and the head of the repository I can't generate this error. I haven't
seen this error in the past either, so I can't explain. As I can't
generate the same error either its a bit difficult to fix it.

D.

-- 
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



reply via email to

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