help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculation error


From: asha g
Subject: Re: Calculation error
Date: Wed, 20 Feb 2013 14:43:12 +0800 (SGT)


 Thanks. That was the problem. Now I get the correct answer.
I thought ln was to be written as 2.303 log
Asha
 
 
 
 


From: John B. Thoo <address@hidden>
To: asha g <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Wednesday, 20 February 2013 11:55 AM
Subject: Re: Calculation error


On Feb 19, 2013, at 10:19 PM, asha g wrote:

> I am getting an error while calculating the following using Octave 3.2 . Can you please crosscheck. Also, when I write ln( ro/rl)/l - I get an error  message. can ln not be computed in Octave ? I would like to get the values of rho and rx. Thanks Asha G

> l = 400*10^-4; % in cm
> ro= 1.85*10^-4;% in cm
> rl= 0.3*10^-4;%in cm
> rho = (2.303/l)*log(ro/rl)
> %rho = ln(ro/rl)/l;
> x = linspace(0,l,N)
> rx= ro*(exp(-rho*x))

Hi.  I think you need to use "log" instead of "ln" for log to the base  e.

octave-3.2.3:1> log (exp (1))
ans =  1

---John.

-----------------------------------------------------------------------
*PRIMUS*
The all-around best journal for undergraduate mathematics teaching.
<http://www.tandfonline.com/toc/upri20/current>  or Twitter @ReadPRIMUS





reply via email to

[Prev in Thread] Current Thread [Next in Thread]