Dear colleagues,
I am trying to manipulate an expression that starts at a time =
"tonset". Everything works nice until I try to plot.
#define independent variable
sage: t = var('t')
# define parameters
sage: taum, tauh = var('taum, tauh')
sage: tonset=var('tonset')
# normalize the equation
sage: f(t) = -e^(-t/taum)*(1-e^(-t/tauh))
sage: Tmax = solve(diff(f(t),t)==0,t)[0].rhs()
sage: norm_f(t) = (f(t-tonset) / f(Tmax))
# standard plotting gives wrong values
plot(norm_f.subs(taum=0.3, tauh=5, tonset=3), 0, 5, figsize=[6,3])
# tonset should be given to the plotting to return the real values
plot(norm_f.subs(taum=0.3, tauh=5, tonset=3), 0+3, 5+3, figsize=[6,3])
Would it be possible to manipulate the equation so that plot does not
have to be corrected for tonset every time? . I tried with Piecewise
but this does not allow to plot
Any ideas?
Thanks so much in advance
Jose
--
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