bugGNU Octave - Bugs: bug #46457, octave still prints struct array...

 
 

bug #46457: octave still prints struct array contents after print_struct_array_contents( false )

Submitter:  - <_101782>
Submitted:  Mon 16 Nov 2015 04:54:14 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Nov 2015 08:21:27 AM UTC, comment #3: 

And I agree that having a way to limit the extent of the vectors octave displays would be helpful. Once again don't hesitate to ask on the help mailing list, there are many Octave gurus that could answer, and it will help other users (at least me :-))

Pantxo Diribarne <pantxo>
Group Member
Tue 17 Nov 2015 07:42:22 AM UTC, comment #2: 

Thanks for your quick reaction. I understand now that the behavior is as intended. I misunderstood "scalar structures" as "scalar fields of structures", probably because of what Matlab does: Matlab prints scalar fields, and short vector fields, but not long vector fields, as in my example. I still think it would be very useful to have similar behavior in Octave, but I understand this is a not a bug, so this report can indeed be closed.

- <_101782>
Mon 16 Nov 2015 08:26:19 PM UTC, comment #1: 

Hi,

Thanks for your bug report. As stated in the documentation, print_struct_array_contents "does not affect scalar structures whose elements are always printed". Actually "false" is the default, and octave does not display data for struct arrays:


do_disp = print_struct_array_contents ()
t1(2).t2 = 1:1000


Now I don't know if there is a workaround to extend this behavior to scalar structs and this is probably a good question for the help mailing list.

Can I close this report?

Pantxo Diribarne <pantxo>
Group Member
Mon 16 Nov 2015 04:54:14 PM UTC, original submission:  

according to the user manual you can use print_struct_array_contents( false ) to prevent Octave from printing all the elements of the fields of a struct array, but it doesn't seem to work. This is impractical for fields that are very large matrices like below. The code snippet below prints all 1000 elements, while I would expect it to print something like "t2: 1x1000 matrix".


print_struct_array_contents( false )
t1.t2 = 1 : 1000


- <_101782>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by _101782 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-17 pantxo Open/ClosedOpen Closed
    2015-11-16 pantxo StatusNone Invalid / Not an Octave Bug

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code