[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenat
From: |
Luis Mendo |
Subject: |
[Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array |
Date: |
Mon, 27 Nov 2017 18:57:40 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?52542>
Summary: Weird behaviour of vertical concatenation with empty
char array
Project: GNU Octave
Submitted by: lmendo
Submitted on: Mon 27 Nov 2017 11:57:39 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Luis Mendo
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: Any
_______________________________________________________
Details:
These three lines should give the same:
double([ones(1,0); 'A'])
double([char(ones(1,0)); 'A'])
double(vertcat(char(ones(1,0)), 'A'))
However, the results are respectively
ans = 65
ans =
65
32
ans = 65
(or see it online in this link:
https://tio.run/##y08uSSxL/f8/Jb80KSdVIzo/L7VYw1DHQNNaQd1RPVaTCyaRnJFYpAGXRZcuSy0qSU4s0UBTpQNSpan5/z8A)
How does that space (character 32) crawl in at the end of the second result?
The output in Matlab R2017a is just `65` in all three cases.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52542>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array,
Luis Mendo <=
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/27
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, John W. Eaton, 2017/11/28
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/28
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/28
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/28
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/28
- [Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array, Rik, 2017/11/28