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

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

[Octave-bug-tracker] [bug #48837] cellfun mangles @size for clasdef


From: Dave Goel
Subject: [Octave-bug-tracker] [bug #48837] cellfun mangles @size for clasdef
Date: Sat, 20 Aug 2016 19:53:31 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

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

                 Summary: cellfun mangles @size for clasdef
                 Project: GNU Octave
            Submitted by: deego
            Submitted on: Sat 20 Aug 2016 07:53:28 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Dave Goel
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:



Dear Octave,

carandraug (irc) asked me to report this bug. 


I am using casadi, a computer algebra system, which has its own classes.

x is a casadi SX object.  I don't know anything about classes, and can't
provide a test class.

But, if this limited information helps, here's an interesting bug:

octave:4> version ## on debian gnu/linux, from jessie-backports. 
ans = 4.0.3 

(Create a SX object: octave:2> x=SX.sym('x', 1, 2))

## Using package symbolic. 

octave:3> size(x)
ans =
   1   2

octave:6> cellfun(@size, {x}, 'unif' , false)
ans = 
{
  [1,1] =
     1   1
}
## wrong size.

## Let's try workarounds :

octave:7> cellfun(@(x)size(x), {x}, 'unif' , false)
ans = 
{
  [1,1] =
     1   1
}
octave:8> cellfun(@(x) feval(@size, x), {x}, 'unif' , false)
ans = 
{
  [1,1] =
     1   1
}
## no luck, still. (So, I resorted to a loop, eventually.)

Dave





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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