Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Plot the results of Findroot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122739] Plot the results of Findroot
  • From: Dimitris Kontopoulos <dimitris.jp at gmail.com>
  • Date: Wed, 9 Nov 2011 06:24:11 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hello everyone,

I have a system of 21 simultaneous equations where i want to calculate
the values of x1, x2...x21 and i am trying to evaluate it by using
FindRoot.

I have 2 problems,
1) I want to tell FindRoot to calculate this set for a range of values
for 2 parameters (n and d) that are found in the equations
2) I want to plot the results of x1, x2,...x20 for the range of the
parameters.

i have named each of the 21 equations y1, y2, y3.... y21 and this is
how i wrote the command for FindRoot:

FindRoot[{y1, y2, y2, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14,
   y15, y16, y17, y18, y19, y20,
  x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 +
     x14 + x15 + x16 + x17 + x18 + x19 + x20 + x21 == 1}, {{x1,
   0.0272275467214981, 0, 1}, {x2, 0.0271731, 0, 1}, {x3, 0.04279, 0,
   1}, {x4, 0.042534, 0, 1}, {x5, 0.0548527, 0, 1}, {x6, 0.054198, 0,
   1}, {x7, 0.0627144, 0, 1}, {x8, 0.0614572, 0, 1}, {x9, 0.066180, 0,
    1}, {x10, 0.064208, 0, 1}, {x11, 0.075882, 0, 1}, {x12, 0.062862,
   0, 1}, {x13, 0.06160, 0, 1}, {x14, 0.058231, 0, 1}, {x15,
   0.0230354, 0, 1}, {x16, 0.0250354, 0, 1}, {x17, 0.055199, 0,
   1}, {x18, 0.026367, 0, 1}, {x19, 0.028367, 0, 1}, {x20, 0.051339,
   0, 1}, {x21, 0.028735, 0, 1}}]


Now every time i want to find the solution for each n and d i manually
type their values
e.x.
n=10^4
d=10^6

and then i get the answer from FindRoot for all the x1,x2,....x21

What i want to do is calculate x1,x2,...x21 for n ranging from 10^4 to
10^9 and d ranging from 10^4 to 10^11.

And in the end I want to plot the results (for a given d) in a graph
where the y axis is one of the x1,x2,..x21 and the x axis is n

I tried creating a table first so i can plot its contents but it
doesn't seem to be working....
Table[n, d,
 Evaluate[MyFunction[n, d]], {n, 10^4, 10^9, 10^4}, {d, 10^4, 10^9,
  10^11}]

I would appreciate all the tips you can give me

Dimitris



  • Prev by Date: Re: Import files on accessible URL and save in
  • Next by Date: Re: What inspite FindInstance
  • Previous by thread: NIntegrate fails to work...
  • Next by thread: Re: Plot the results of Findroot