Fork me on GitHub
#mathematics
<
2022-11-11
Gunnar10:11:30

Hello friends. I've been off the clojure train a while but I am now seriously considering an application. (Yes it seems like I'm asking almost the same question as the previous one, but since it is almost year old(!) I may as well start a new thread. I also need a little bit more help than "you could solve it with core.matrix", if you feel up for it. 🙏) I'd like a function that will solve a linear equation. Something like: I pass it an expression "A = (B+2) x C + 3 x D - E" (that can be EDN encoded somehow - I don't need a string parser), and I pass it a map that provides values for any N-1 of the variables. The function figures out which is the unknown variable, and solves for it. If the input is over-constrained or under-constrained it will report something useful about that. It's a bonus if it can do multiple equations / multiple unknowns, but at this time I don't think I need it. Any tips you might have? 🙏