Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 14 years ago

kcrisman gravatar image

I think I'm just explaining Mike's answer a little, but I think that you should be able to define a dictionary

sage: params = {m1:1,m2:0.5,l1:1,l2:0.5,g:9.8}

and then do f.subs(params) as above. In his example,

var('t, w') params = {w: 2,d:1,c:1} f(a,b,c,d,e,f,g,t) = sin(twd-c) g=f.subs(params) g

should do it (I can't figure out how to get the blockquote to do more than one line... sigh). Mike, is that extra thing necessary, given that the arguments are the same in both cases?

click to hide/show revision 2
No.2 Revision

I think I'm just explaining Mike's answer a little, but I think that you should be able to define a dictionary

sage: params = {m1:1,m2:0.5,l1:1,l2:0.5,g:9.8}

{m1:1,m2:0.5,l1:1,l2:0.5,g:9.8}

and then do f.subs(params) as above. In his example,

var('t, w')
 params = {w: 2,d:1,c:1}
 f(a,b,c,d,e,f,g,t) = sin(twd-c)
  sin(t*w*d-c)
g=f.subs(params)
  g

g

should do it (I can't figure out how to get the blockquote to do more than one line... sigh). it. Mike, is that extra thing necessary, given that the arguments are the same in both cases?