[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63733] Matlab incompatibility for certain cor
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #63733] Matlab incompatibility for certain corner case indexing operations |
Date: |
Mon, 30 Jan 2023 14:56:03 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63733>
Summary: Matlab incompatibility for certain corner case
indexing operations
Project: GNU Octave
Submitter: rik5
Submitted: Mon 30 Jan 2023 11:56:01 AM PST
Category: Interpreter
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 30 Jan 2023 11:56:01 AM PST By: Rik <rik5>
Here are a few incompatibilities for indexing between Matlab and Octave
1)
z = zeros (5,0);
z(3) = 1;
Octave throws an error, while Matlab results in a 1x3 vector. Interestingly,
Octave gets the same result as Matlab (1x3 vector) if "z = zeros (0, 5)" (see
also example below where column index of 1 seems to be special).
2)
z = zeros (0,1);
z(3) = 1;
size (z)
Octave returns a row vector ([1, 3]) while Matlab returns a column vector ([3,
1]) for this case.
3)
z = zeros (1,2,3,4);
z(5,2) = 1;
size (z)
Octave throws an error, while Matlab returns [5,2,3,4].
4)
z = zeros (1,1,3);
z(5) = 1;
size (z)
Octave throws an error, while Matlab returns [1,1,5].
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63733>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #63733] Matlab incompatibility for certain corner case indexing operations,
Rik <=