MathGroup Archive 2002

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

Search the Archive

Re: Plot problem


All you need is Evaluate in your code:

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

or you might prefer:

Plot[#1, {#2, -5, 5}] & @@@ Transpose[{FuncList, VarList}]

Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/


On Tuesday, October 15, 2002, at 05:17 PM, Frank Brand wrote:

> 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: List processing
  • Next by Date: Re: Plot problem
  • Previous by thread: Re: Plot problem
  • Next by thread: Re: Plot problem