[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenat
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52542] Weird behaviour of vertical concatenation with empty char array |
Date: |
Tue, 28 Nov 2017 01:03:05 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #3, bug #52542 (project octave):
I can sort of see how the parser might get to what you are suggesting. The
examples below are somewhat confirmatory of your hypothesis that the array
size is being set before the concatenation takes place.
## In this case, total size is 2 + 1 rows = 3
## empty char matrix is filled out with blanks so 3x1 array of spaces
double ([char(ones(2,0)); 'A'])
ans =
65
32
32
## In this case, the row vector orientation takes precedence and a 1x4
## array is created, and then the first entry is replaced with 'A'
double ([char(ones(0,4)); 'A'])
ans =
65 32 32 32
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52542>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/