Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem: is not a list of numbers with dimensions

1,635 views
Skip to first unread message

Fikri Serdar GOKHAN

unread,
May 5, 2008, 6:20:05 AM5/5/08
to
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


Bhuvanesh

unread,
May 6, 2008, 6:47:08 AM5/6/08
to

All Mathematica functions start with an uppercase letter, so exp[...]
should be Exp[...]

Bhuvanesh,
Wolfram Research

Bob Hanlon

unread,
May 6, 2008, 6:48:33 AM5/6/08
to
In both cases, use Exp rather than exp

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}]

{x->0.0000454986}


Bob Hanlon

Jean-Marc Gulliet

unread,
May 6, 2008, 6:48:54 AM5/6/08
to
Fikri Serdar GOKHAN 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;

==========^^^
Must be Exp

> FindRoot[x-A*exp[k*g*x*Leff-Attenuation*L],{x,0}]

===============^^^
Must be Exp


> 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

============^^^
Must be Exp

Hi Serdar,

You just made a typo when writing the exponential function. Keep in mind
that every function names starts with a capital letter, i.e. *Exp* and
not exp.

In[1]:= 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}]

Out[7]= {x -> 0.0000454986}

Regards,
-- Jean-Marc

Sooraj R

unread,
May 7, 2008, 7:07:39 AM5/7/08
to

replace exp by Exp..and everything will work fine
Please remember..in Mathematica..all functions
starts
with capital letters

In[36]:= 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}]

Out[42]= {x -> 0.0000454986}

____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

0 new messages