Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: FindRoot solving of Excel input columns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86209] Re: FindRoot solving of Excel input columns
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 6 Mar 2008 02:57:00 -0500 (EST)
  • References: <fq8r91$jg1$1@smc.vnet.net>


Hi John,

in mathematica prepare something like:

{A1,A2,A3,A4}=Transpose@ImportString[" "]

then select and copy in Excel the rectangle containing your data.

In mathematica place the cursor in the prepared expression inside the 

quotes and paste the data. Finally execute this statement. Now the data 

is available in A1,A2...

Next you must write correct mathematica syntax.

Finally it is not clear what you want to do. You have much more 

equations than variables (assuming that A1/A2 is element by element), 

therefore, an exact solution does not exists. Maybe you want a least 

square solution?

Finally to export in Excel format you may e.g. use:

Export["d:/tmp/t.xls",Transpose[{A1,A2,A3,A4}]]

hope this helps, Daniel





itedin wrote:

> Hi, I'm in a situation where I need to solve 100's of points

> numerically, and all my data's in excel.  I've successfully created a

> FindRoot to solve eqn's for one set of data points.  However, I really

> need to automate this... I've read through help to no avail.  Here's

> what I'm working on:

> 

> A's are columns of excel data with a several hundred rows of data.

> k's are constants

> t's are variables to solve and plot.

> 

> Eqn1 = t1 - k1*Log[ 1 + (A1/A3)*(1 - exp(-t3)*(exp(-t2) ]

> Eqn2 = t2 - k2*Log[ 1 + (A2/A3)*(1 - exp(-t3/) ]

> Eqn3 = t3 -k3*t2

> FindRoot[{Eqn1==0,Eqn2==0,Eqn3==0}, { {t1,1},{t2,1},(t3,1} } ]

> 

> What I'd like to do is...

> 1. import 4 column (A1,A2,A3,A4) excel sheet, where A4 is carried

> through and not processed.

> 2. export 4 column results for (t1,t2,t3,A4) to xls, and plot t1 vs

> A4, t2 vs A4, t3 vs A4 in mathematica.

> 

> I've read through help to no avail... and have tried some kind of For

> loop on this FindRoot, and haven't been successful.

> 

> Much appreciate anybody's help.

> 

> Regards,

> John

> 




  • Prev by Date: Re: Version 6.0.2
  • Next by Date: Re: RandomGraph
  • Previous by thread: Quantum for Mathematica updated
  • Next by thread: Re: FindRoot solving of Excel input columns