While using Octave in c++ code, if the octave value list contained a double matrix, I would retrieve it as out(0).matrix_value()
(out
is the octave_value_list
). Is there something similar for symbolic variable/expression? I do not want to retrieve it as a string value, as I cannot use the string for further calculations.
Asked
Active
Viewed 392 times
1

Misha
- 379
- 1
- 2
- 12
-
I can only suggest looking at the code for the `sym` class (sym.m). If it's anything like Matalb, a symbolic variable is an object and one of the (possibly private) properties/methods may be helpful. In Matlab, one would probably use `charcmd` to get a persistent reference to underlying symbolic variable/expression inside of the MuPAD engine. I wouldn't be surprised if something similar could be done for SymPy that Octave uses, but it may be tricky to track down. You might have more luck on Octave's mailing list or by emailing the package author. – horchler Aug 18 '15 at 15:20