Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*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 1995

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

Search the Archive

Re: Question about LISTS

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2711] Re: Question about LISTS
  • From: Christian.Jost at epc.u-psud.fr (Christian Jost)
  • Date: Sat, 9 Dec 1995 01:54:12 -0500
  • Organization: Universite Paris-Sud XI

In article <4a3ejh$qnc at dragonfly.wri.com>, "cjkelly at bu.edu"
<cjkelly at bu.edu> wrote:

> The idea is to extract elements out of a list and then plug them
> into LINE[{{x,y},{x1,y1}}]=20

Use pure functions (see Mathematica manual), they are an elegant tool for
such tasks:

In[14]:=3D
  x=3D{4,5,-3,1};

In[18]:=3D
  Line[{{0,0},{#,#^2}}]& /@ x

Out[18]=3D
  {Line[{{0, 0}, {4, 16}}], Line[{{0, 0}, {5, 25}}],=20
 Line[{{0, 0}, {-3, 9}}], Line[{{0, 0}, {1, 1}}]}

In[19]:=3D
  Show[Graphics[%]]

Hope that helps, Christian.

--=20
Christian Jost, Universit=E9 Paris-Sud XI, Orsay, France
jost at psisun.u-psud.fr


  • Prev by Date: Box counting dimension for fractals via Mathematica??
  • Next by Date: Re: Scientific Web - Speedcomparison Mathematica 2
  • Previous by thread: Re: Question about LISTS
  • Next by thread: Re: Help with contour plots, please?