On Thursday, 26 September 2013 17:13:28 UTC-3, Nils Bruin wrote:
<...>
> The problem is that subs expects the keys for its dictionary to be
> symbolic variables, not strings. If you do
>
> sage: P2={SR(k):v for k,v in params.iteritems()}
> sage: (sols[0][0].rhs()).subs(P2)
>
> it should work.
On Thursday, September 26, 2013 10:52:56 AM UTC-7, jorges wrote:
>
>
> -
>
> sage: a1=1; b1=-2; c1=3
> sage: na1=1; nb1=-2; nc1=3
> sage: params=dict(a1=a1, b1=b1, c1=c1)
> sage: params1=dict(a1=na1, b1=nb1, c1=nc1)
> sage: params2=dict(a1=1, b1=-2, c1=3)
> sage: (sols[0][0].rhs()).subs(param
On 09/25/2013 03:24 PM, Bassie wrote:
> Hello
>
> Can you evaluate all expressions at one? Like say, if i made a
> mistake 5 expressions before my last expression, and this mistake is
> reapeated in all the 5 last expressions, do I have to evaluate all 5
> expressions?
>
When you have enough cod
On Thursday, 26 September 2013 13:11:12 UTC-3, kcrisman wrote:
>
>
> This is just a thought - would creating a dictionary of your parameters
> help? Then you can just substitute the dictionary once you've created it,
> eliminating at least a little tedium or error potential... In your second
On Thursday, September 26, 2013 10:46:15 AM UTC-4, jorges wrote:
>
> Hi,
> I am working on the analytical solution to a specific problem. Nothing
> special, I guess, just a few 2nd order differential equations. The real
> burden, and thus the motivation for using sage, is that the resulting
>
Sorry, I left the references out:
[1]
http://ask.sagemath.org/question/1981/how-to-recursively-substitute-from-global-name
[2]
http://ask.sagemath.org/question/2545/is-there-a-way-to-update-an-expression-with-new
On Thursday, 26 September 2013 11:46:15 UTC-3, jorges wrote:
>
> Hi,
> I am worki
Hi,
I am working on the analytical solution to a specific problem. Nothing
special, I guess, just a few 2nd order differential equations. The real
burden, and thus the motivation for using sage, is that the resulting
equations are long and thus the possibility of introducing small typos or
erro
On Wed, 25 Sep 2013, kcrisman wrote:
This is pretty vague, but ... assuming that you are using the expression
like
a = 2
print a
print a+1
print a+2
print a+3
and a should have been 4, then yes, you would have to evaluate them all.
Sage uses readline, like bash. In bash I can use ! -command: