> Thus I wonder why this doesn't work
>
> def f(x): return r.dnorm(x,mean=100,sd=25)._sage_()
> plot(f(x)(x,90,110))
>
> while
>
> def f(x): return x^3
> plot(f(x),(x,0,2))
>
> works perfectly.

The problem is that the "f(x)" calls f with the symbolic argument "x"
_at the time you call the plot function_.

In the first case, r.dnorm doesn't know what to do with a symbolic x,
and barfs before it returns.  OTOH, in the second function, the f(x)
call simply returns x^3, so it's equivalent to typing plot(x^3, (x, 0,
2).

Both cases should work if you use

plot(f, (x,90,110))
plot(f, (x,0,2))


Doug

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

Reply via email to