Message Boards Message Boards

0
|
2604 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Make this plot line work?

Posted 8 years ago

I've already done similar plots like

Manipulate[
 Plot[Evaluate[Table[ni[(x/T) - (5/T)], {a, {0, -1, 1}}]], {x, 0, 10},
   AxesOrigin -> {0, 0}, 
  PlotRange -> {Automatic, {0, Automatic}}], {T, 0.01, 50}] 

but i can't understand why this (attached) won't work

Attachments:
POSTED BY: tomas giud
5 Replies

Manipulate wants its slider variables to appear explicitly in the first argument. Compare this

something = x;
Manipulate[something, {x, 0, 1}]

with this:

somethingElse[x_] = x;
Manipulate[somethingElse[x], {x, 0, 1}]
POSTED BY: Gianluca Gorni
Posted 8 years ago

ok thx

POSTED BY: tomas giud
Posted 8 years ago

I think, perhaps, you meant that mu should be present inside ni[ ] argument....i now notice that T is so in my first working example...but i can't see how that could be the problem since manipulate works for general expressions ( i.e. you can vary function parameters) as long as functions and their arguments

POSTED BY: tomas giud

I think the problem is that the Manipulate argument

Plot[Evaluate[
  Flatten[Table[
    ni[1/(10^(LT))], {a, -1, 0}, {\[Epsilon]i, 0, 1}]]], {LT, -2, 5}]

does not contain any explicit reference to \[Mu]. Try with

z[\[Beta]_, \[Mu]_] := Exp[\[Beta] \[Mu]];
ni[\[Beta]_, \[Mu]_] := 
 1/((z[\[Beta], \[Mu]]^-1) Exp[\[Beta] \[Epsilon]i] + a)
Manipulate[
 Plot[Evaluate[
   Flatten[Table[
     ni[1/(10^(LT)), \[Mu]], {a, -1, 0}, {\[Epsilon]i, 0, 
      1}]]], {LT, -2, 5}], {\[Mu], 0, 3}]
POSTED BY: Gianluca Gorni
Posted 8 years ago

i reviewed the nb that i attached and it does contain the mu specification for manipulate...maybe you accidentaly erased it...it follows what you first quoted with a comma separation, because it's the second argument of manipulate...i'll give your code a try anyways thx

POSTED BY: tomas giud
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract