Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.8K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plotting graphs with manipulate: empty plots

Posted 4 years ago

Hello Together,

I am currently working on visualizing my results with the help of Mathematica. There is mainly one Problem (I think) and that has to do with the manipulate order.

1.) What do I have to calculate? Physics apart the formulas I have to calculate look like this

Now I know that the last 3 Integrals can not be calculated by the System because they have unspecified parameters. So I calculated it one time for g=w=1 and d=0.5. I just defined the Functions:

l[x_]=ArcCos[0.9841229182759271+0.0158770817240729*Cos[x]]

(wich is o for the parameters above)

g[t_]=Sqrt[-1/8 (-1+Sqrt[1-0.5^2])(3-Cos[2 *t])]

(which is Sqrt[k] for the parameters above)

and evaluated the Integral of g with

f

Then I plotted my wanted function

Plot[x*l[x]/f[x],{x,0,10}]

image

Now the stuff I need help with:

The thing is that I would like a shortcut to the plot and the option to manipulate the parameters g, w and d afterwards. I tried the following:

But I don't get any results. I think the parameters are the problem so the system cannot solve the numerical Integral for n. I am grateful for any help.

Regards,

Henrie

POSTED BY: Henrie Küppers
4 Replies

I somehow got it to work. I send you my code so If anyone is interested you can just look at what I did.

POSTED BY: Henrie Küppers
Posted 4 years ago

The controls in a Manipulate are localized. Changing the value of the controls for g, w or d updates only the references to g, w or d that explicitly appears in the first argument to Manipulate. No other updates are done.

An example that works, a Manipulate plotting your function n:

n[x_, g_, w_, d_] := Sqrt[-1/8 (-1 + Sqrt[1 - d^2]) (2 g^2 + w^2 - w^2 Cos[2 g * x])]

Manipulate[
    Plot[n[t, g, w, d], {t, 0, 10}],
    {{g, 1}, 0, 20, Appearance -> "Labeled"},
    {{w, 1}, 0, 2 Pi, Appearance -> "Labeled"},
    {{d, 0.5}, 0, 1, Appearance -> "Labeled"}
 ]
POSTED BY: Hans Milton
Posted 4 years ago

Not clear what you are trying to accomplish. A Manipulate is being passed to Plot.

k[y_] := Manipulate[NIntegrate[...
Manipulate[Plot[k[x]...
POSTED BY: Rohit Namjoshi
POSTED BY: Henrie Küppers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard