Helly everybody,
I will try to keep this as simple as possible.
I have a function which looks like this:
Min[T_, E_, D_] := Module[ ..... List = {...} ];
In any case this function gives me a list that looks like this {1,2, 1, 4,5, 2,1}
etc. (Actually D
determines the number of entries in this list)
I use Listplot to plot this list.
ListPlot[Min[T, E, D], PlotRange -> {Automatic, {0, 0.5}}]
I use
Manipulate
to be able to manipulate any of these 3 Variables.Manipulate[ListPlot[Min[...], {T, 1, 20}, {D, 10, 20}, {E, 1, 20}]
Everything worked perfectly and dandy, but I ran into one problem.
E
has a dynamic limit that changes when I changeD
orT
and few other factors.So in order to be able to calculate the dynamic limit of
E
, I had to write a few new lines in the oldMin
.So now it looks something like this:
Min[T_, E_, D_] := Module[Emax = T + D + a; List = {...}];
where
a
is a variable only used in that function
Even though Emax
is getting calculated correctly, I just cannot use it outside of the function.
When I plug it into the Manipulate
stuff like this:
ListPlot[Min[...], {T, 1, 20}, {D, 10, 20}, {E, 1, Emax}]
the code does not know what Emax
is.
Any ideas what I can do?
I need to use a variable from inside a function as limit for a Manipulate
.
Min
,List
,N
,D
andE
are built-in and (mostly) protected symbols. Can you prepare a small working example which shows the problem? It is not clear if mentioned symbols are the problem or the exact syntax you use (which is not shown either). $\endgroup$