Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Manipulate with non-explicit variables' topicStudent Support Forum > General > Archives > "Manipulate with non-explicit variables"

Next Comment >Help | Reply To Topic
Author Comment/Response
Abed Alnaif
01/11/13 6:05pm

Hello,

I am trying to use the Manipulate command with the manipulated variables not being stated explicitly, but it seems like the variables are required to be stated explicitly within the command. Is there any way around this? Consider the following examples:

The following code works fine:

Manipulate[
reprule = {end -> endval};
NDSolve[{y''[x] + Sin[y[x]] y[x] == 0, y[0] == 1, y'[0] == 0},
y, {x, 0, end} /. reprule], {endval, 10, 20}]

But the code below returns the error "Endpoint endval is not a real numer":

reprule = {end -> endval};
Manipulate[
NDSolve[{y''[x] + Sin[y[x]] y[x] == 0, y[0] == 1, y'[0] == 0},
y, {x, 0, end} /. reprule], {endval, 10, 20}]


It seems like the issue is that the variable "endval" is not stated explicitly within the command in the latter case. Is there any way to get the Manipulate command to work on variables which are not stated explicitly? I am using Mathematica for Students 7.0.1.0.

Thank you,

Abed

URL: ,

Subject (listing for 'Manipulate with non-explicit variables')
Author Date Posted
Manipulate with non-explicit variables Abed Alnaif 01/11/13 6:05pm
Re: Manipulate with non-explicit variables Michael 01/12/13 9:09pm
Re: Manipulate with non-explicit variables yehuda 01/13/13 05:59am
Next Comment >Help | Reply To Topic