[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0 |
Date: |
Mon, 11 Dec 2023 05:23:31 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65008>
Summary: ind2sub with indices lower than 0
Group: GNU Octave
Submitter: None
Submitted: Mon 11 Dec 2023 10:23:29 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 11 Dec 2023 10:23:29 AM UTC By: Anonymous
In Matlab, indices in ind2sub are not restricted to be strictly greater than
0:
[x,y] = ind2sub([32 32], 0)
x =
0
y =
1
Octave complains:
[x,y] = ind2sub([32 32], 0)
error: ind2sub: invalid index index 0: subscripts must be either integers 1 to
(2^63)-1 or logicals
This is what Matlab returns more generally:
[x,y] = ind2sub([32 32], -3:3)
x =
-3 -2 -1 0 1 2 3
y =
1 1 1 1 1 1 1
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65008>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0,
anonymous <=
- Message not available
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, Philip Nienhuis, 2023/12/11
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, Nicholas Jankowski, 2023/12/11
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, anonymous, 2023/12/11
- Message not available
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, Rik, 2023/12/11
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, anonymous, 2023/12/13
- Message not available
- [Octave-bug-tracker] [bug #65008] ind2sub with indices lower than 0, Rik, 2023/12/13