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

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

[Octave-bug-tracker] [bug #65261] inconsistent index


From: anonymous
Subject: [Octave-bug-tracker] [bug #65261] inconsistent index
Date: Mon, 5 Feb 2024 19:53:04 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65261>

                 Summary: inconsistent index
                   Group: GNU Octave
               Submitter: None
               Submitted: Tue 06 Feb 2024 12:53:04 AM UTC
                Category: Coding Style and Maintenance
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 8.4.0
         Discussion Lock: Any
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 06 Feb 2024 12:53:04 AM UTC By: Anonymous


octave:1> size ([])
ans =

   0   0

octave:2> size ([], 1:5)
ans =

   0   0   1   1   1


It should be zero for all dimensions. This inconsistency makes trouble when
appending in different directions.


octave:1> a = b = c = [];
octave:2> a(end+1, :, :) = 1
a = 1
octave:3> b(:, end+1, :) = 2
b = 2
octave:4> c(:, :, end+1) = 3
c =

ans(:,:,1) = 0
ans(:,:,2) = 3


Why are a and b only one element but c is two elements? All should be one
element.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65261>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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