On Thu, Apr 22, 2010 at 2:46 AM, pallab <pallabb...@gmail.com> wrote:
> How to specify variables in a plot. Say I want something  like,
>
> At=S*x
> S=4
> plot(At,0,2)

Note that when you assign "S=4" it doesn't change the value of S in At.

>
> Question is that how to instruct Sage that I want to plot against 'x'.
> In Mathematica this is conveniently done by
>
> Plot[At,{x,0,2}]

You can do this by

sage: var('S, x')
(S, x)
sage: At = S*x; At
S*x
sage: At.subs(S=4)
4*x
sage: plot(At.subs(S=4), (x,0,2))

--Mike

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to