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/9, l == 100, F == 650000]
>       vars = [M, mu, a, a_1, a_4, theta, l, F]
>       sln = solve(eqns, vars, solution_dict = True)
>       sln = simplify(sln[0])
>       return sln[M].n(10)
>
> #End Function Moment________________________
>
> print Moment(sln, 0.01)
>
> plot(Moment(sln, mu), mu, 0, 0.1)

Moment is a Python function, so when you write Moment(sin, mu) it  
tries to evaluate it right then. You can do

plot(lambda mu: Moment(sln, mu), mu, 0, 0.1)

- Robert

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to