help-octave
[Top][All Lists]
Advanced

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

Re: Some problems with numerical computation


From: Liam Groener
Subject: Re: Some problems with numerical computation
Date: Mon, 23 Jan 2012 01:19:17 -0800

On Jan 22, 2012, at 10:16 PM, asha g wrote:

I have sorted the brackets and now get 2.2182e-11 which is far from 3.7746.
What could be the problem ?
Asha
 
 


On Sun, Jan 22, 2012 at 10:07 PM, asha g <address@hidden> wrote:
I did the following calculation by using a calculator . This is what I get with that :

A = 12/11 = 1.09
A1= 1.2
B = 3/11 = 0.272
h2 = 0.003523506


a = 3.083
b= -8.9696
c = 9.5909
d1 = -4.606
ee = 0.90151

f(1) = (-215.81 +627.872-671.363 +322.42-63.1057 ) / 0.0035235

= 0.0133/0.0035235 = 3.7746 

I hope you can sort this problem for me soon.
Thanks
Asha
 




You have some brackets in the wrong plave

f(1) = (a*V(1))+(b*V(2))+(c*V(3))+(d1*V(4))+(ee*V(5))/h2;
should be
f(1) = (a*V(1) +b*V(2) +c*V(3) +d1*V(4)+ee*V(5))/h2;

doug 
This is a precision problem in your calculator calculation. Octave uses double precission in it's internal calculations. By default, output is rounded to 5 significant figures. To output to full precision, enter the command: format long

Try repeating your calculator calculations using:
a =  3.08333333333333
b = -8.96969696969697
c =  9.59090909090909
d1 = -4.60606060606061
ee =  0.901515151515151

Liam G.


reply via email to

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