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

MathGroup Archive 2008

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

Search the Archive

Re: Problem: is not a list of numbers with dimensions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88507] Re: [mg88450] Problem: is not a list of numbers with dimensions
  • From: "W_Craig Carter" <ccarter at mit.edu>
  • Date: Tue, 6 May 2008 06:47:12 -0400 (EDT)
  • References: <200805051016.GAA08633@smc.vnet.net>

Hello Fikri,
When beginning to use Mathematica, it is probably a good idea to leave
off the trailing ";"

In this way, you will quickly see the syntax errors---this will lead
you to start exploring some of the documentation.  For this example, I
would say this would be a good paradigm for those just getting
started:

(*Build up expressions with symbols, not numbers*)
Leff = (1 - Exp[-Attenuation*L])/Attenuation
GenExpr = x - A*Exp[k*g*x*Leff - Attenuation*L]

(*use replace to create a particular instance of your expression*)
Expr = GenExpr /. {A -> 10^(-4), k -> 2/3, g -> 1.12*10^(-11),
   L -> 7200, Attenuation -> 0.23026*0.475*10^(-3)  }

(*visualize what you intend to do*)
Plot[Expr, {x, -1, 1}]

(*Check the documentation and (if everything is fine) get your answer*)
FindRoot[Expr, {x, 0}]


On Mon, May 5, 2008 at 6:16 AM, Fikri Serdar GOKHAN <fsgokhan at gmail.com> wrote:
> When run the below code,
>
>
>  A=1*10^(-4);
>
>  k=2/3;
>
>  g=1.12*10^(-11);
>
>  Attenuation= 0.23026*0.475*10^(-3);
>
>  L=7200;
>
>  Leff=(1-exp[-Attenuation*L])/Attenuation;
>
>
>
>  FindRoot[x-A*exp[k*g*x*Leff-Attenuation*L],{x,0}]
>
>
>
>  It executes the below solution,
>
>
>
>  FindRoot::nlnum: The function value {0.-0.0001 exp[-0.787489+0. \
>
>  (1.+Times[<<2>>])]} is not a list of numbers with dimensions {1} at \
>
>  {x} = {0.}.
>
>
>
>  I need your help about numerical and Alpha_numeric solution of this problem.
>
>
>
>
>  f(x)= x-A*exp[k*g*x*Leff-Attenuation*L
>
>
>
>  Serdar
>
>
>



-- 
W. Craig Carter


  • Prev by Date: Re: Problem: is not a list of numbers with dimensions
  • Next by Date: Re: Hash Table for self avoiding random walks
  • Previous by thread: Thank you..
  • Next by thread: Re: Problem: is not a list of numbers with dimensions