Symbolics.jl
Symbolics.jl copied to clipboard
Symbolics & left + right inverses?
I noticed that Symbolics
seems to handle A*x=b
via x = A\b
when A
and b
are symbolic arrays. However, with x*A=b
, x=b/A
does not work, and I have to write x=b*inv(A)
.
Is this the way it should be, or do you plan to include the /
operator in the future?
Yeah we should include /
in the future...
Hello, I'm new to Julia and Symbolics development, but took a shot at implementing this feature here: https://github.com/aravindh-krishnamoorthy/Symbolics.jl/commit/868b93789ffbc2574127aaa13eda23c4d2040409 + https://github.com/aravindh-krishnamoorthy/Symbolics.jl/commit/9b984c396a78553cdf7f64a1e8dded6779cd8b57
Test: https://github.com/aravindh-krishnamoorthy/Symbolics.jl/commit/ecde0b85d6e232bf3a8d16545d209243f8882c64
I still don't understand a few things: (1) Why Symbolics.substitute only works with reshape(b,1,3), (2) Why the reshape trick doesn't work for M in b/M, (3) Why using complex numbers for b and M results in Julia errors. Nevertheless, the simple tests seem to pass.
@aravindh-krishnamoorthy that's pretty good! :) The reshape functionality is not all there. it uses the generic ReshapedArrays if I remember correctly. I would accept a PR with these changes, and you could open more issues about the reshape and substitute issues.
Thank you very much for the positive comment. The PR is #881
I will soon analyse and raise the issues for reshape and substitute.