[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Precision of fsolve
From: 
John W. Eaton 
Subject: 
Precision of fsolve 
Date: 
Tue, 22 Sep 1998 07:47:36 0500 (CDT) 
On 22Sep1998, Daniel Tourde <address@hidden> wrote:
 I am using the function fsolve like this :

 y(1) = 12*((x(3)*x(1))/2)/E  nlcoef(3);
 y(2) = 12*((x(3)*x(2)+x(1)*x(4))/6)/E  nlcoef(4);
 y(3) = 12*((P*x(3)/2+x(4)*x(2)+x(1)*x(5))/12)/E  nlcoef(5);
 y(4) = 12*((P*x(4)/2+x(5)*x(2))/20)/E  nlcoef(6);
 y(5) = 12*((P*x(5))/60)/E  nlcoef(7);


 Some of my nlcoef values are very small (between 1e7 and 1e10) and it
 happens that the solutions send back by fsolve can be wrong due to
 rounding and precision errors.

 My question is the following :

 How can I increase the precision of fsolve, how can I lower the
 admissible error ?
Try fsolve_options:
octave:1> fsolve_options
*** fsolve_options:
fsolve_options (KEYWORD, VALUE)
Set or show options for fsolve. Keywords may be abbreviated
to the shortest match.
Options for fsolve include:
keyword value
 
tolerance 1.49012e08
octave:2> fsolve_options ("tol", 1e12)
octave:3> fsolve_options ("tol")
ans = 1.0000e12
jwe