[OctDev] Cell array (of structs) to array failure
Jaroslav Hajek
highegg at gmail.com
Wed Jun 24 11:53:24 CDT 2009
On Wed, Jun 24, 2009 at 6:40 PM, Jaroslav Hajek<highegg at gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Travis Collier <travcollier at gmail.com>
> Date: Wed, Jun 24, 2009 at 2:21 PM
> Subject: [OctDev] Cell array (of structs) to array failure
> To: octave-dev at lists.sf.net
>
>
> I may be doing this completely wrong, but it works in some cases and
> used to work reliably (in 3.0.5).
>
> I've got a function returning a cell array of structs or empty
> elements which I'm appending to form a single array of structs.
> cors = [cors c{:}]
> This used to work, and still does most of the time.
>
> In fact, just [c{:}] is failing sometimes with the same error...
> error: octave_base_value::complex_array_value(): wrong type argument `struct'
>
> Any clue as to the problem, or suggestion how to do this sort of
> append differently (or better)?
>
> Sorry, I can't seem to duplicate the results with very simple
> inputs... they all seem to work.
> I'm attaching a saved variable "c" which fails.
>
> Here is as trimmed down a version as I can get:
> octave:254> c{:}
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans =
> {
> maxlag = 17628
> }
>
> ans = [](0x0)
> ans =
> {
> maxlag = 17604
> }
>
> ans =
> {
> maxlag = 17612
> }
>
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans = [](0x0)
> ans =
> {
> maxlag = 27
> }
>
> ans =
> {
> maxlag = 27
> }
>
> ans = [](0x0)
> ans = [](0x0)
> octave:255> [c{:}]
> error: octave_base_value::complex_array_value(): wrong type argument `struct'
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Octave-dev mailing list
> Octave-dev at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/octave-dev
>
>
>
>
First, you were on the wrong list.
Second, please check out this one (it was Murphy again):
http://hg.savannah.gnu.org/hgweb/octave/rev/0f85d9564057
thanks
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list