<p>Hi,<br>
I usually do as follow: first store the list produced by lsolve as L, then use a.subs(L) as the value of a. For a cleaner code you may wish to add a check that the result is indeed a numeric and no exception occured.<br>
Best wishes. <br>
Vladimir</p>
<div class="gmail_quote">On Oct 11, 2012 11:19 PM, "Zach" <<a href="mailto:refinedcode@gmail.com">refinedcode@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi I stumbled across this incredibly useful library and I wanted to use the lsolve function. I was reading the tutorial pdf to figure out how to use it. So from lsolve i end up with an expression like:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<i>{a==3,b==4}<br></i></blockquote><div><br>I was wondering how I could get a value of the a and b symbols from this? I would ideally like to store them in an int to use in another library. I have been looking for an answer for a while so I would really appreciate if anyone knows? I could parse it like a string but Im assuming there is a better way?<br>
<br>Thank you for your time,<br>Zach <br></div><br>
<br>_______________________________________________<br>
GiNaC-list mailing list<br>
<a href="mailto:GiNaC-list@ginac.de">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br>
<br></blockquote></div>