octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #65877] struct field assignment using {:} prod


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #65877] struct field assignment using {:} produces invalid dimension error
Date: Fri, 14 Jun 2024 09:45:21 -0400 (EDT)

Update of bug #65877 (group octave):

                  Status:                    None => Confirmed              
                 Summary: struct field setting using semicolon => struct field
assignment using {:} produces invalid dimension error

    _______________________________________________________

Follow-up Comment #1:

can confirm with Octave 9.2.0. but i don't think the semicolon has anything to
do with it (or did you mean the colon).  Matlab is able to use that syntax for
object/field creation. Octave can only use that syntax for an existing
field/object:


>> A.a{:}=1
error: invalid dimension inquiry of a non-existent value

>> c = {99}
c =
{
  [1,1] = 99
}

>> A.a=c
A =

  scalar structure containing the fields:

    a =
    {
      [1,1] = 99
    }


>> A.a{:}=1
A =

  scalar structure containing the fields:

    a =
    {
      [1,1] = 1
    }


>> B.c = 1
B =

  scalar structure containing the fields:

    c = 1

>> B.a{:}=1
error: invalid dimension inquiry of a non-existent value

>> B.a(:)=2
B =

  scalar structure containing the fields:

    c = 1
    a = [](0x0)






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65877>

{savane: Include the next line when replying by email.}
{savane: user = octave-bug-tracker@gnu.org; tracker = bugs; item = 65877}

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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