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

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

[Octave-bug-tracker] [bug #46859] Error in "for" cycle


From: anonymous
Subject: [Octave-bug-tracker] [bug #46859] Error in "for" cycle
Date: Sat, 09 Jan 2016 14:21:22 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

URL:
  <http://savannah.gnu.org/bugs/?46859>

                 Summary: Error in "for" cycle
                 Project: GNU Octave
            Submitted by: None
            Submitted on: sab 09 gen 2016 14:21:21 UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Francesco Menoncin
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

T=1001/250;
dt=1/250;
x(1)=10;
for i=2:T/dt
x(i)=x(i-1)+randn();
end

These commands give the following error message (since T/dt is not exactly
equal to 1001):

error: subscript indices must be either positive integers less than 2^31 or
logicals

When T=1000/250, for instance, the error is not produced and the result is
correct.

I have checked with other software (Scilab and R) and this mistake is not
produced.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Messaggio inviato con/da Savannah
  http://savannah.gnu.org/




reply via email to

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