| Author |
Comment/Response |
JBB
|
07/18/12 5:39pm
Here I come again with a similar problem that I still don't get:
When I try to define a function with a Dsolve I get an error in Manipulate.
In a simplified example:
func[coef_] = {{y -> Function[{x}, DSolve[y'[x] == Cos[coef *x], y, x]]}}
Manipulate[Plot[{{Evaluate[y[x] /. func[coef] /. C[1] -> {Range[-5, 0]}]}}, {x, -10, 10}], {{coef , 1}, 0.1, 5}]
I get an error: DSolve::dsvar: "-9.99959 cannot be used as a variable"
I think that this is because Manipulate assigns a value to x (= -9.99959) BEFORE solving the DSolve.
Is there any workaround? Thanks, JBB
URL: , |
|