Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

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:
  • Prev by Date: Re: tensors
  • Next by Date: How to speed up this calculation?
  • Previous by thread: Re: Plot problem
  • Next by thread: Re: Plot problem