[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56172] concatenation of empty, 2-D, but not 0
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56172] concatenation of empty, 2-D, but not 0x0 arrays differs from Matlab |
Date: |
Fri, 19 Apr 2019 13:54:48 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?56172>
Summary: concatenation of empty, 2-D, but not 0x0 arrays
differs from Matlab
Project: GNU Octave
Submitted by: rik5
Submitted on: Fri 19 Apr 2019 10:54:46 AM PDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Yet another corner case involving concatenation.
In Octave, this code produces an error
[zeros(0,1), zeros(0,1), 1]
error: horizontal dimensions mismatch (0x2 vs 1x1)
However, in Matlab it succeeds with a result of [1], but it does throw a
warning message.
Warning: this concatenation operation includes an empty array with an
incorrect number of rows.
Concatenation including empty arrays will require all arrays to have the same
number of rows in a future release.
The related code where the concatenated matrix is 0x0 works, and produces no
error or warning.
[zeros(0,0), zeros(0,0), 1]
It seems like it would be useful to support current Matlab behavior because
this syntax has probably been used in 25 years of m-file code.
Related bugs (resolved) are bug #31615 and bug #49759.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56172>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #56172] concatenation of empty, 2-D, but not 0x0 arrays differs from Matlab,
Rik <=