| 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: , |
|