octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51241] Infinite loop in condest


From: Rik
Subject: [Octave-bug-tracker] [bug #51241] Infinite loop in condest
Date: Thu, 15 Jun 2017 12:01:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Follow-up Comment #8, bug #51241 (project octave):

Within normest1, the problem is this section of code


          while (i <= imax)
            ## The maximum number of parallel columns of length n with
entries
            ## {-1,1} is 2^(n-1). Therefore, if the number of columns of S is
            ## greater than 2^(n-1), for sure some of them are parallel to
some
            ## columns of Sold. Don't even try to change them (i <= 2^(n-1)).
            ## Now, check if S(:,i) is parallel to any previous column of S
            p = (any (abs (S(:,i)' * S(:,1:i-1)) == n));
            if (p || (any (abs (S(:,i)' * Sold) == n)))
              ## i-th column of S parallel to a previous or to a
              ## column of Sold: change it.
              S(:,i) = sign (2*rand (n, 1)-1);
            else
              i++;
            endif
          endwhile


If the first branch of the if statement is taken, then the variable i is never
incremented.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51241>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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