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

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

[Octave-bug-tracker] [bug #53111] Symbolic does not simplify results the


From: anonymous
Subject: [Octave-bug-tracker] [bug #53111] Symbolic does not simplify results the same as matlab
Date: Fri, 9 Feb 2018 14:58:20 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

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

                 Summary: Symbolic does not simplify results the same as
matlab
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 09 Feb 2018 07:58:18 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Using 
symbolic v2.6.0
sympy v1.1.1



syms c a X X0 Y Y0
U=(X-X0)*cos(a)+(Y-Y0)*sin(a);
W=-(X-X0)*sin(a)+(Y-Y0)*cos(a);
x=-c*(U/W);
x_d_a=diff(x,a)


matlab:From others


x_d_a =
- c - (c*(cos(a)*(X - X0) + sin(a)*(Y - Y0))^2)/(cos(a)*(Y - Y0) - sin(a)*(X -
X0))^2


octave: Me

x_d_a = (sym)
    c⋅(-(X - X₀)⋅sin(a) + (Y - Y₀)⋅cos(a))   c⋅(-(-X +
X₀)⋅cos(a) + (Y - Y₀)⋅sin(a))⋅((X - X₀)⋅cos(a) + (Y -
Y₀)⋅sin(a))
  -
──────────────────────────────────────
-
───────────────────────────────────────────────────────────────────────────
      (-X + X₀)⋅sin(a) + (Y - Y₀)⋅cos(a)                              
                             2
                                                                ((-X +
X₀)⋅sin(a) + (Y - Y₀)⋅cos(a))



Note: the final value is good




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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