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

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

[Octave-bug-tracker] [bug #42487] issymmetric incompatible with Matlab


From: Markus Bergholz
Subject: [Octave-bug-tracker] [bug #42487] issymmetric incompatible with Matlab
Date: Sun, 21 Sep 2014 07:33:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0

Follow-up Comment #2, bug #42487 (project octave):

I cannot apply this patch. I did it manually, but some of the asserts are
failing. Furthermore, the Matlab example results from their website doesn't
match to the results from this patch (or with any other Version of octave).

Furthermore, it seems like this patch is partly used already, because the
issymmetric version in 3.8.2 differs from the current hg version. 

Octave 3.8.2

    octave:1> issymmetric (logical (eye (2)))
    ans =                    0

Current hg version

    >> issymmetric (logical (eye (2)))
    ans =                    1


What are the results in Matlab?


    %!assert (issymmetric (1))
    %!assert (issymmetric (1), 'noskew')
    %!assert (! issymmetric ([1, 2]))
    %!assert (issymmetric ([]))
    %!assert (issymmetric ([]), 'noskew')
    %!assert (issymmetric ([1, 2; 2, 1]))
    %!assert (! (issymmetric ("test")))
    %!assert (issymmetric ([1, 2.1; 2, 1.1], 0.2))
    %!assert (issymmetric ([1, 2i; 2i, 1]))
    %!assert (issymmetric ([1, 2i; 2i, 1], 'noskew'))
    %!assert (! (issymmetric ("t")))
    %!assert (! (issymmetric (["te"; "et"])))
    %!assert (issymmetric (speye (100000)))
    %!assert (issymmetric (speye (100000), 'noskew'))
    %!assert (issymmetric (logical (eye (2))))
    %!assert (issymmetric (logical (eye (2)), 'skew'))
    
    %!test
    %! a = [0, 2; -2, 0];
    %! assert (issymmetric (a, 'skew'))
    %! assert (! issymmetric (a, 'noskew'))
    
    %!test
    %! s.a = 1;
    %! assert (! issymmetric (s));
    
    %!error issymmetric ([1, 2; 2, 1], 0, 0)
    %!error issymmetric ()



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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