[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-12 Thread Robert Bradshaw
If one does sage: Ii.subs(pars).variables() (x,) so that is fine. However, sage: RR(Ii.subs(pars)(x=-10)) Traceback (most recent call last): ... TypeError which tells you what the error is (not very helpful in this case). On a hunch sage: CC(Ii.subs(pars)(x=-10)) 2.59329101030962e-14*I so

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-12 Thread kex
Thank you very much Stan, this was helpfull I have more questions, I get this message: verbose 0 (3605: plot.py, _plot) WARNING: When plotting, failed to evaluate function at 200 points. verbose 0 (3605: plot.py, _plot) Last error message: '' Why does it fail to evaluate ? my datasheet: #Defi

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-10 Thread Stan Schymanski
Hi Boris, Here is what I do: # Define the variables: var('GAMA BETA THETA') # Create a dictionary with the parameter values for plotting: pars = dict(GAMA=1,BETA=1,THETA=10) # Define the symbolic function J1(x) = GAMA*x + BETA*x^2 + THETA # Substitute the parameters into the equation and plot it

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-10 Thread kex
Thank you, if I assign a value I lose symbolic expression ? If I set GAMA=1 than gama in equation is not a letter/symbol of gama but it is a number that was asigned to gama? I though that I can keep the expression in symbolic notation and still plot/calculate the equation. So this means that the

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-10 Thread Simon King
Dear Boris, On Nov 10, 9:56 pm, kex <[EMAIL PROTECTED]> wrote: > GAMA==1 > BETA==1 > THETA==10 > N==1000 > MI==1 > JR==0 > PI==3 > PSI==x Are these supposed to be assignments? If "yes", it should be GAMA=1 BETA=1 THETA=10 etc. When you do GAMA==1 where GAMA is a variable, you just create a for

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-10 Thread kex
var('G') GAMA=var('gamma') BETA=var('beta') PSI=var('psi_c') THETA=var('theta') N=var('N') MI=var('mu') J1(x)=var('J_e1') JR=var('J_R') PI=var('pi') GAMA==1 BETA==1 THETA==10 N==1000 MI==1 JR==0 PI==3 PSI==x G = GAMA * (exp(PSI) + BETA*sqrt(THETA)*exp(PSI/THETA)) / sqrt(2*PI*(N^2 * MI - 2*PSI))

[sage-support] Re: How do you plot equations if one parameter is a list of values ?

2008-11-04 Thread William Stein
On Tue, Nov 4, 2008 at 3:06 PM, kex <[EMAIL PROTECTED]> wrote: > > Hi! > > J is an equation with variables defined in ## my variables > > What I want to do is plot the J versus x > x is a list of values lets say from -100 to 40 > > so how do I change from x=1 to x=[-100,..,40] > and fix this er