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

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

[Octave-bug-tracker] [bug #44777] Error "no method for 'scalar struct =


From: Guillaume
Subject: [Octave-bug-tracker] [bug #44777] Error "no method for 'scalar struct = scalar'"
Date: Wed, 08 Apr 2015 15:43:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

URL:
  <http://savannah.gnu.org/bugs/?44777>

                 Summary: Error "no method for 'scalar struct = scalar'"
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Wed 08 Apr 2015 03:43:50 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

I came across the following with structure arrays; MATLAB is fine with it but
am not sure it is a valid syntax.


A = struct('A',1,'B',1);
[A(:).C] = deal(1);
error: invalid assignment to cs-list outside multiple assignment
error: assignment failed, or no method for 'scalar struct = scalar'

A = struct('A',1,'B',1);
[A.C]=deal(1);

% works fine if numel(A) > 1
A = struct('A',{1,2},'B',{1,2});
[A(:).C] = deal(1);

A = struct('A',{1,2},'B',{1,2});
[A.C] = deal(1);





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44777>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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