Re: Storing Data into Excel - Pls Help ...
- To: mathgroup at smc.vnet.net
- Subject: [mg31549] Re: [mg31440] Storing Data into Excel - Pls Help ...
- From: Omega Consulting <omega_consulting at yahoo.com>
- Date: Sat, 10 Nov 2001 01:19:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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