Re: Plot problem
- To: mathgroup at smc.vnet.net
- Subject: [mg37195] Re: [mg37179] Plot problem
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Wed, 16 Oct 2002 14:25:45 -0400 (EDT)
- References: <akkbts$7o2$1@smc.vnet.net> <200210150817.EAA01784@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Forget about procedural programming, i.e., no more Do's ever again. Use
MapThread:
In[1]:=
FuncList={Exp[x],Sin[y],z^3};
VarList={x,y,z};
In[3]:=
f[a_,b_]:=Plot[a,{b,-5,5}]
In[4]:=
MapThread[f,{FuncList,VarList}];
Oh, and try not to use uppercase letters in the first position of your
functions and variable names. These are reserved for Mathematica built-in
functions.
Tomas Garza
Mexico City
----- Original Message -----
From: "Frank Brand" <frank.brand at t-online.de>
To: mathgroup at smc.vnet.net
Subject: [mg37195] [mg37179] Plot problem
> 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
>
>
>
- References:
- Plot problem
- From: Frank Brand <frank.brand@t-online.de>
- Plot problem