MathGroup Archive 2001

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

Search the Archive

Re: Storing Data into Excel - Pls Help ...


At 02:48 AM 11/5/2001, Steve wrote:
>Hi there,
>
>I am looking for a way to automate Mathematica to extract & store all
>the Real numbers (Imaginary nos. can be ignored) solved from a simple
>simultaneous equations such as the one below.
>
>Where I can use Excel & easily plot all the data later. There will be
>an iteration using the For loop where step will be increase by 1 on
>each iteration.
>
>So the Excel data should contain the step & the real answers assigned
>to it & repeated for each new step no.
>
>-------------
>step=3;
>Solve[{x==3*x^3 + 6*x + step, y==8*y^2 + 3*x}, {x,y}]
>
>-------------
>Mathematica Format:
>
>step=3;
>
>\!\(Solve[{x == 3  x\^3 + 6  x + step, \ y == 8  y\^2 + 3  x}, {x,
>y}]\)
>
>---------------
>
>Does anyone knows how to do it?
>Many Thanks in advance....
>
>Cheers ....
>Steve

minstep=(starting value for step)
maxstep=(ending value foir step)

sol[step_] := Cases[{step, x, y} /.
          NSolve[{x==3*x^3+6*x+step, y==8*y^2+3*x}, {x, y}],
          {_, _Real, _Real}]

lst=Flatten[Table[sol[step],  {step, minstep, maxstep}],1]

Export["myfile.csv", lst]

--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"

Spend less time searching and more time finding.
http://www.wz.com/internet/Mathematica.html



  • Prev by Date: Re: List Manipulation
  • Next by Date: Re: List Manipulation
  • Previous by thread: Re: Storing Data into Excel - Pls Help ...
  • Next by thread: lists w/o double brackets