[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread Robert Bradshaw
On Feb 21, 2009, at 7:24 AM, hpon wrote: > > Here it is.. I'm totally new to this, so feel free to comment on my > code in general. [...] > #Function Moment_ > def Moment(sln, mu_): > > eqns = [sln[0], mu == mu_, a == 255, a_1 == 155, a_4 == 200, theta == > pi

[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread hpon
Here it is.. I'm totally new to this, so feel free to comment on my code in general. F, F_3, F_1, l, M = var('F, F_3, F_1, l, M') a, a_1, mu, a_4, theta = var('a, a_1, mu, a_4, theta') eqn1 = F_3 * l / 2 + M - F_1 * l / 2 == 0 eqn2 = F_1 == F * (a / a_1) * (1 - (mu * a_4) / (a*(sin(theta) + mu

[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread David Joyner
Can you take the function you are trying to plot, reduce it to the simplest expression which will reproduce the same error and post it? Can you also include the OS and version of Sage? On Sat, Feb 21, 2009 at 10:02 AM, hpon wrote: > > It doesn't work with the function I'm using. Although, "pri

[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread hpon
It doesn't work with the function I'm using. Although, "print Moment (sln, mu)", where mu is the variable, yields a real numeric result in what appears to be the entire range of mu. This is the plot command: plot(Moment(sln, mu), mu, 0, 1) The error message points at the return statement of the

[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread David Joyner
This is one way: sage: x,y = var("x,y") sage: f = x^2+y^2 sage: plot(f(x,3),x,-1,1) On Sat, Feb 21, 2009 at 9:22 AM, hpon wrote: > > Hello, > > I have created a function F = F(x, const). I would like to create a > 2D-plot of F in some range of x. What should the syntax look like? > > Regar