MathGroup Archive 2010

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

Search the Archive

Re: Numerical simulation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113616] Re: Numerical simulation
  • From: Alexei Boulbitch <alexei.boulbitch at iee.lu>
  • Date: Fri, 5 Nov 2010 05:09:54 -0500 (EST)

Hi Peter,

Try FindRoot. For instance,

eq = 1/2 + c + g*(1 - p) + Sqrt[c + p*g - 1] == 0;

FindRoot[eq /. {c ->  0.1, g ->  0.5}, {p, 4}]

{p ->  4.54164}

Have fun, Alexei


Hi,
Does anybody have a good idea on how to set up and run simple
numerical simulations in Mathematica?

I have an equation that consists of the variables p, g that I want to
solve for p for different values of g=[0,1] and c=[0,1]. The function
could be for example 1/2+c+g(1-p)+root(c+p*g-1)=0. (the real equation
is to complex to solve algebraicly using Solve[XX,p]).

I guess I need to construct a matrix for different values [0,1] of g
and c and then use this to numerically solve for p. but how do i set
this up in a smart way? And how do I use the results to plot p as a
function of for example g?

Best,
Petter

-- 
Alexei Boulbitch, Dr. habil.
Senior Scientist
Material Development

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 CONTERN
Luxembourg

Tel: +352 2454 2566
Fax: +352 2454 3566
Mobile: +49 (0) 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu

www.iee.lu

--

This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you are not the intended
recipient and have received this e-mail in error, you are hereby
notified that any review, copying or distribution of it is strictly
prohibited. Please inform us immediately and destroy the original
transmittal from your system. Thank you for your co-operation.



  • Prev by Date: Re: Assertions in Mathematica?
  • Next by Date: adding lists term by term
  • Previous by thread: Numerical simulation
  • Next by thread: Re: Numerical simulation