[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35589] Incorrect behavior of vertical concate
From: |
Nir Krakauer |
Subject: |
[Octave-bug-tracker] [bug #35589] Incorrect behavior of vertical concatenation array operator in >2 dimensions |
Date: |
Wed, 22 Feb 2012 19:24:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 |
URL:
<http://savannah.gnu.org/bugs/?35589>
Summary: Incorrect behavior of vertical concatenation array
operator in >2 dimensions
Project: GNU Octave
Submitted by: nir_krakauer
Submitted on: Wed 22 Feb 2012 07:24:19 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Nir Krakauer
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.4.0
Operating System: GNU/Linux
_______________________________________________________
Details:
cat gives the correct vertical concatenation behavior for N-D arrays. For
example,
A = cat(1, ones(1, 5, 2), 2*ones(1, 5, 2))
returns
A =
ans(:,:,1) =
1 1 1 1 1
2 2 2 2 2
ans(:,:,2) =
1 1 1 1 1
2 2 2 2 2
However, using a semicolon, which should be equivalent to cat(1, ..) according
to the manual and which does work in 2-D, leads to garbage:
A = [ones(1, 5, 2); 2*ones(1, 5, 2)]
A =
ans(:,:,1) =
2.0000e+00 2.0000e+00 2.0000e+00 2.0000e+00 2.0000e+00
2.6744e-316 2.4173e-316 2.4189e-316 2.4072e-316 2.3905e-316
ans(:,:,2) =
2.0000e+00 2.0000e+00 2.0000e+00 2.0000e+00 2.0000e+00
2.4189e-316 2.4190e-316 2.4190e-316 2.4190e-316 2.4190e-316
(The exact garbage returned changes from call to call.)
On the other hand, using the comma for concatenation along the second
dimension gives the same results as cat(2, ..), as expected.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35589>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #35589] Incorrect behavior of vertical concatenation array operator in >2 dimensions,
Nir Krakauer <=