Mathematica Use DO loop in Plot order at mathematica 8

AI Thread Summary
The discussion focuses on using a Do loop in Mathematica 8 to plot multiple graphs in a single plot order. The original poster seeks assistance in changing one variable and observing its effects on others within the graph. A solution is suggested that utilizes the Plot function to display multiple functions simultaneously by creating a list of functions using Table. An example is provided, demonstrating how to plot a series of functions derived from a variable range without needing a Do loop. Alternatively, a method using a Do loop is also presented, where plots are generated and appended to a list, which is then displayed using the Show function. This highlights the flexibility of Mathematica in handling graphical representations through different programming approaches.
es.no
Messages
12
Reaction score
0
Can anyone help me to in this problem?
I want to use DO loop in Plot order at mathematica 8, how can I do this?
I want to change one variables and see the changes in other variables in the graph, and want to plot all of my graph in one Plot order. Like this.

I Uploaded my file too.
 

Attachments

  • mmmmm.png
    mmmmm.png
    1.7 KB · Views: 667
Physics news on Phys.org
This does not use a Do loop.

Look up Plot in the help system and see that

Plot[{f1,f2,f3} will plot f1 and f2 and f3 on the same graph.

Then realize you can make {f1,f2,f3} using Table[].

Plot[Table[Sqrt[r^2 - x^2], {r, 1, 4}], {x, 0, 4}, AspectRatio -> Automatic]

Or do this the hard and error prone way with a Do loop

r = 4;
plotlist = {};
Do[
AppendTo[plotlist, Plot[Sqrt[r^2 - x^2], {x, 0, 4}]];
r = r - 1
, {4}];
Show[plotlist, AspectRatio -> Automatic]
 
  • Like
Likes es.no

Similar threads

Back
Top