symbolic, unable to assign equality to matrix

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

symbolic, unable to assign equality to matrix

nrjank
came across an apparent Matlab incompatibility error related to symbolic variable assignment:


came up with what I think is a simple case:

Matlab 2020a:
>> syms a b c d
>> e = [a == b, c == d]
e =
[ a == b, c == d]
>> f(1) = a==b
f =
a == b
>> f(2) = c==d
f =
[ a == b, c == d]
>> g(2) = c==d
g =
[ 0, c == d]
>> g(1) = a==b
g =
[ a == b, c == d]

Octave 5.2.0 and Symbolic 2.9.0 (with non-bundled 3.7.0):
>> syms a b c d
>> e = [a==b,c==d]
e = (sym) [a = b  c = d]  (1x2 matrix)
>> f(1) = a==b
f = (sym) a = b
>> f(2) = c==d
error: Python exception: TypeError: cannot determine truth value of Relational
    occurred at line 7 of the Python code block:
    if not A or not A.is_Matrix:
error: called from
    pycall_sympy__ at line 178 column 7
    mat_rclist_asgn at line 78 column 5
    mat_replace at line 144 column 5
    subsasgn at line 101 column 13
>> g(2) = c==d
g = (sym) [0  c = d]  (1x2 matrix)
>> g(1) = a==b
g = (sym) [a = b  c = d]  (1x2 matrix)





Reply | Threaded
Open this post in threaded view
|

Re: symbolic, unable to assign equality to matrix

nrjank
On Wed, May 13, 2020 at 3:08 PM Nicholas Jankowski <[hidden email]> wrote:
came across an apparent Matlab incompatibility error related to symbolic variable assignment:



filed octave and symbolic bugs: