MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Plot problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37191] RE: [mg37179] Plot problem
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 16 Oct 2002 14:25:18 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Frank,

The first method is just to Evaluate the iterator.

FuncList = {Exp[x], Sin[y], z^3};
VarList = {x, y, z};

Do[Plot[FuncList[[i]], Evaluate[{VarList[[i]], -5, 5}]], 
  {i, 1, Length[VarList]}]

But a simpler method is to use functional programming...

MapThread[Plot[#1, {#2, -5, 5}] &, {FuncList, VarList}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/ 

From: Frank Brand [mailto:frank.brand at t-online.de]
To: mathgroup at smc.vnet.net


Dear colleagues,

how can I solve the following problem: The task is to successively plot 
the functions given in FuncList with the accociated variable


FuncList = {Exp[x], Sin[y], z^3};

VarList = {x, y, z};

Do[Plot[FuncList\[LeftDoubleBracket]
       i\[RightDoubleBracket], {VarList\[LeftDoubleBracket]
         i\[RightDoubleBracket], -5, 5}], {i, 1, Length[VarList]}]]

Thanks in advance
Frank Brand





  • Prev by Date: c++ book
  • Next by Date: Re: Plot problem
  • Previous by thread: Re: Plot problem
  • Next by thread: Re: Plot problem