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

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

[Octave-bug-tracker] [bug #51178] publish() sometimes removes last eleme


From: anonymous
Subject: [Octave-bug-tracker] [bug #51178] publish() sometimes removes last element from vector after section break
Date: Sun, 4 Jun 2017 09:06:30 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

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

                 Summary: publish() sometimes removes last element from vector
after section break
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 04 Jun 2017 01:06:29 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Tim Malte Gräfje
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Publishing the following code with publish('test.m') produces incorrect
results.


tm = 29.43357091;
ta = 31 + (8/24);
tb = 31 + ((19+(45/60))/24);
dt = (5 / 60) / 24;
ts = ta:dt:tb;

numel(ts)

Mm = 1;
nm = 2;

%%
Ms = Mm + 2 * pi * nm * (ts - tm);
numel(Ms)

%%
numel(Ms)


Expected result:
The output of the numel() calls should be the same each time (142). Running
the code from the octave command line produces this result but using the
publish() function does not.

Actual result:
The last section break removes the last element from the Ms vector which
causes the last numel() call to return 141 instead of 142.

Further information:
I am running Arch Linux.

The bug does not get triggered if you change the first three lines to


tm = 29.43357091 - 29;
ta = 31 - 29 + (8/24);
tb = 31 - 29 + ((19+(45/60))/24);





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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