(
Jump to the original submission)
Sat 04 Jul 2015 01:27:42 PM UTC, comment #9:
Marked as duplicate of bug #42152
|
Sat 04 Jul 2015 09:48:16 AM UTC, comment #8:
Honestly don't see how to mark a dupe on this bug tracker... or maybe I just don't have permission?
|
Sat 04 Jul 2015 09:46:36 AM UTC, comment #7:
Yes, I think this is a core octave bug:
https://savannah.gnu.org/bugs/index.php?42152
Also noted here, with workarounds:
https://github.com/cbm755/octsympy/issues/8
|
Sat 04 Jul 2015 12:03:58 AM UTC, comment #6:
Adding maintainer of the symbolic package to cc
|
Sun 28 Jun 2015 11:27:29 AM UTC, comment #5:
I believe the problem is related to how octave and sympy communicate. According to sympy's documentation http://docs.sympy.org/latest/tutorial/matrices.html, sympy will not recognize octave's matrix notation. It requires rows to have their own brackets.
If this workaround is used from the very beginning it works just fine:
So for now, as long as matrices are typed in following sympy's notation right from the start, it works.
|
Sat 27 Jun 2015 06:10:11 PM UTC, comment #4:
this fails
A = [ a, 2; 6, 4 ]
so the first item in each row must be a sym
|
Sat 27 Jun 2015 05:09:36 PM UTC, comment #3:
I did some more digging:
syms a
this works
A = sym([ a, 2; a, 4 ])
and this works
A = [ a, 2; a, 4 ]
but this does not work
A = [ 1, 2; a, 4 ]
A = sym([ 1, 2; a, 4 ])
so if the first item in the matrix is a sym then it works
|
Sat 27 Jun 2015 03:08:34 PM UTC, comment #2:
one more workaround
cmd={
"a= symbols('a')" ;
"B=Matrix([[1, -1], [3, a], [0, 2]]);return ( B,)"
};
dd=python_cmd(cmd)
|
Sat 27 Jun 2015 01:53:55 PM UTC, comment #1:
this might be a workaround
syms a b c d f m n p ;
n =sym( [ a; b; c; 4 ] )
d=reshape(n,2,2)
p = sym([sym(0); 1; sym(2); 3])
m=reshape(p, 2, 2)
f=inv(d)
m*f
So we can make a col. vec. and then reshape it.
|
Sat 27 Jun 2015 10:52:04 AM UTC, original submission:
I am using octave forge package "symbolic", and it basically fails when constructing multiple-rows matrices that combine real numbers and symbolic variables.
Simple example of the error:
This code produces the following error:
Without any knowledge of the internals of this package this error seems somehow related to this other filed bug #42152
The workaround suggested at https://github.com/cbm755/octsympy/issues/8 also produces an error:
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items
Digest:
bug dependencies.
Items that depend on this one: None found
Follow 4 latest changes.