octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: displaying structure arrays


From: Francesco Potortì
Subject: Re: displaying structure arrays
Date: Thu, 29 Jan 2009 17:15:03 +0100

>| It seems to me that displaying structure arrays has changed in 3.1.
>| Now, I get this:
>| 
>| octave> x = 1:10;
>| octave> N = length(x);
>| 
>| octave> y = repmat(struct('field1',[],'field2',[]),1,N)
>| y =
>| {
>|   1x10 struct array containing the fields:
>| 
>|     field1
>|     field2
>| }
>| 
>| I think that this behaviour is due to this change:
>| 
>| 2008-03-07  John W. Eaton  <address@hidden>
>| 
>|      * ov-struct.cc (octave_struct::print_raw): Don't print contents fo
>|      struct arrays that have more than one element.
>| 
>| 
>| How can I see the fields' contents all at once?
>
>If you think the behavior in the development version is bad, then I
>think we should discuss what it should do on the maintainers list.

In fact, I think it is better than before, as a default.  However, there
are times I would like to have a quick look at the whole contents of the
struct array (for small ones, at least).

Maybe disp() could behave differently and show everything?  Or there
could be a function controlling the printout, in the spirit of
struct_levels_to_print() ?

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]