bugGNU Octave - Bugs: bug #55193, Error in structure documentation.

 
 

bug #55193: Error in structure documentation.

Submitter:  Massimo <nightjar>
Submitted:  Mon 10 Dec 2018 10:37:09 AM UTC
   
 
Category:  Documentation Severity:  2 - Minor
Priority:  3 - Low Item Group:  Documentation
Status:  Fixed Assigned to:  siko1056
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 15 Dec 2018 12:48:40 PM UTC, comment #2: 

This section of the documentation will be improved with the next release end of January 2019.  See https://hg.savannah.gnu.org/hgweb/octave/rev/a957e0da8613 .

Kai Torben Ohlhus <siko1056>
Group Member
Mon 10 Dec 2018 11:59:49 AM UTC, comment #1: 

Thank you for the report.  Of course this is not possible in neither Octave, nor Matlab.


x.b


is a double matrix, thus cannot be dot-indexed.  Rather it should be


x.b = [];
x.b.d = 3;


and so on... I'll take care of this.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 10 Dec 2018 10:37:09 AM UTC, original submission:  

I followed this part of the documentation https://octave.org/doc/interpreter/Basic-Usage-and-Examples.html#Basic-Usage-and-Examples

I encountered an error when I changed the value of the element b of the structure x with another structure containing the single element d, which has a value of 3.

This is my log

GNU Octave, version 4.4.1
Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1> x.a = 1;
octave:2> x.b = [1, 2; 3, 4];
octave:3> x.c = "string";
octave:4> x
x =

  scalar structure containing the fields:

    a =  1
    b =

       1   2
       3   4

    c = string

octave:5> y = x
y =

  scalar structure containing the fields:

    a =  1
    b =

       1   2
       3   4

    c = string

octave:6> x.b.d = 3;
error: invalid dot name structure assignment because the structure array is empty.  Specify a subscript on the structure array to resolve.

Massimo <nightjar>

 

(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 siko1056 (Posted a comment)
  • -email is unavailable- added by nightjar (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-15 siko1056 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-12-10 siko1056 SummaryError in structures Error in structure documentation.
    2018-12-10 siko1056 Priority5 - Normal 3 - Low
        Item GroupUnexpected Error or Warning Documentation
        StatusNone Confirmed
        Assigned toNone siko1056
        Operating SystemMicrosoft Windows Any
    2018-12-10 siko1056 Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code