[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #36817] Concatenation of null array and struct
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #36817] Concatenation of null array and struct fails |
Date: |
Mon, 09 Jul 2012 13:18:03 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 |
URL:
<http://savannah.gnu.org/bugs/?36817>
Summary: Concatenation of null array and struct fails
Project: GNU Octave
Submitted by: None
Submitted on: Mon 09 Jul 2012 01:18:02 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Andrew M.
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.4.0
Operating System: Mac OS
_______________________________________________________
Details:
In Matlab I often create an empty array and then use a loop to conditionally
add elements to the array concatenation. In Octave this works fine for integer
data types, but fails for structs. For example:
a=5
x=[[], a] %This works
s=struct('name', 'jim')
y=[[], s] %This fails
The error message is:
concatenation operator not implemented for `scalar struct' by `scalar struct'
operations
My feeling is that the second concatenation should work the same as the first
one, and the same as it does in Matlab. If there is a workaround for this
please let me know.
Thanks.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36817>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #36817] Concatenation of null array and struct fails,
anonymous <=