[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45293] Inconsistent behaviour when appending
From: |
Alexander Klein |
Subject: |
[Octave-bug-tracker] [bug #45293] Inconsistent behaviour when appending to empty matrices |
Date: |
Wed, 10 Jun 2015 11:26:36 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10 |
URL:
<http://savannah.gnu.org/bugs/?45293>
Summary: Inconsistent behaviour when appending to empty
matrices
Project: GNU Octave
Submitted by: matalex
Submitted on: Mi 10 Jun 2015 11:26:35 GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: Any
_______________________________________________________
Details:
The other day I discovered that Octave's behaviour when appending to empty
fields depends on the dimensionality of what is appended and the dimension you
append to, see the final example below, which is completely different from
what happens above it.
If this is intended behaviour, then maybe some warning should be issued!
octave:74> c=[];c(end+1)=1
c = 1
octave:75> c=[];c(end+1,:)=ones(1,2)
c =
1 1
octave:76> c=[];c(:,end+1)=ones(2,1)
c =
1
1
octave:77> c=[];c(end+1,:,:)=ones(2)
c =
ans(:,:,1) =
1 1
ans(:,:,2) =
1 1
octave:78> c=[];c(:,:,end+1)=ones(2)
c =
ans(:,:,1) =
0 0
0 0
ans(:,:,2) =
1 1
1 1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45293>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45293] Inconsistent behaviour when appending to empty matrices,
Alexander Klein <=