Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Dynamic updating of variables in Manipulate' topicStudent Support Forum > General > "Dynamic updating of variables in Manipulate"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
JBB
07/15/12 10:19am

In Response To 'Re: Dynamic updating of variables in Manipulate'
---------
Thanks Yehuda, but when I try to define a function with a Dsolve I get an error in Manipulate.

In a simplified example:

f[w_, t_] := DSolve[y'[x] == Cos[w *x - t], y, x]

Manipulate[Plot[{Sin[w *x - t], {Evaluate[y[x] /. f[w, t] /. C[1] -> {Range[-5, 0]}]}}, {x, -10, 10}], {t, 0, 5*2*Pi}, {{w , 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?

URL: ,

Subject (listing for 'Dynamic updating of variables in Manipulate')
Author Date Posted
Dynamic updating of variables in Manipulate Jbb 07/07/12 4:11pm
Re: Dynamic updating of variables in Manipulate Michael 07/07/12 10:08pm
Re: Dynamic updating of variables in Manipulate yehuda 07/08/12 2:59pm
Re: Re: Dynamic updating of variables in Manipu... JBB 07/15/12 10:19am
Re: Re: Re: Dynamic updating of variables in Ma... JBB 07/16/12 5:00pm
Re: Dynamic updating of variables in Manipulate Jbb 07/09/12 00:54am
Re: Dynamic updating of variables in Manipulate JBB 07/18/12 5:39pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic