[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Concatenation of cell arrays

**From**: |
A S Hodel |

**Subject**: |
Concatenation of cell arrays |

**Date**: |
Fri, 14 May 2004 10:10:13 -0500 |

`I've noted a difference in how Octave and MATLAB process the
``concatenation of cell arrays.
`The notation of
e = [a,b; c,d]

`will combine compatibly dimensioned cell arrays into a single cell
``array in MATLAB, but results in an error in octave. I've put an
``example case below.
`

`Questions: is this worth putting into Octave? (MATLAB compatibility is
``nice, but a good design is nicer)
`` I think the answer is that this would be a nice feature, which leads
``to ...
`Q2: How much work would be involved in putting this into Octave?

` I've not delved into the Octave sources for a long time, and that was
``only in the numerical
`` guts of the code, not the data-structure "computer-sciencey" part of
``Octave.
`
Here's an example:
octave:1> a = {1;2;3};
octave:2> b = {4;5;6};
octave:3> c = [a;b]
error: octave_base_value::array_value(): wrong type argument `cell'
error: evaluating assignment expression near line 3, column 3
>> a = {1;2;3};
>> b = {4;5;6};
>> c = [a;b]
c =
[1]
[2]
[3]
[4]
[5]
[6]
A. S. Hodel Dept. ECE, 200 Broun Hall, Auburn University AL 36849-5201

`(334) 844-1854/fax(334) 844-1809,
``http://www.eng.auburn.edu/users/hodelas , address@hidden
`
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

[Prev in Thread] |
**Current Thread** |
[Next in Thread] |

**Concatenation of cell arrays**,
*A S Hodel* **<=**