MathGroup Archive 1998

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

Search the Archive

Re: mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12671] Re: mathematica
  • From: "Allan Hayes" <hay at haystack.demon.cc.uk>
  • Date: Mon, 1 Jun 1998 23:16:44 -0400
  • References: <6kpu3l$scn@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Antoine Durand wrote in message <6kpu3l$scn at smc.vnet.net>...
>I want to plot the result of an equation calculated with a loop. I've
>tried to do "append[list,solve[eq]]" in order to plot the list but  the
>result of "solve" is a string of characters and not a number.


In[1]:=
lst={};
Do[AppendTo[lst, Solve[x^2==n,x]],{n,0,3}]; lst

Out[1]=
{{{x -> 0}, {x -> 0}}, {{x -> -1}, {x -> 1}},

  {{x -> -Sqrt[2]}, {x -> Sqrt[2]}},

  {{x -> -Sqrt[3]}, {x -> Sqrt[3]}}}

In[2]:=
x/.%
Out[2]=
{{0, 0}, {-1, 1}, {-Sqrt[2], Sqrt[2]}, {-Sqrt[3], Sqrt[3]}}

------------------------------------------------------------- 
Allan Hayes
Training and Consulting
Leicester UK
http://www.haystack.demon.co.uk
hay at haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642



  • Prev by Date: RE: mathematica
  • Next by Date: What am i missing?
  • Previous by thread: RE: mathematica
  • Next by thread: What am i missing?