Dear Samuel
Thank you for your reply.

Inside the function f(x),I added "disp" to display the value of x and error
flag "ierr" after "intg" line .

The "fsolve" and "numderivative" called f many times for many x around the
correct solution x, and the values of x and ierr were displayed for many
calls.
I couldn't find regularity because ierr = 2 occurs for x very close to x
with ierr = 0. I couldn't find the cause of the rounding error.
I couldn't proceed further since the inside of "intg" could not be
monitored.

However, when "ierr" is output, it turns out that the code did not stop even
if the rounding error occurs. As a result, fsolve could find the correct x.

I adopted this ad-hoc solution. Since the inside of g (x, z) have not been
improved so that rounding errors do not occur reliably, similar problems may
occur in the future, but I decided to satisfy this ad-hoc solution.

Best regards,
Masahiro Fujimoto




--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to