help-octave
[Top][All Lists]
Advanced

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

bug in fsolve() affecting convergence depending on the returned args


From: Christophe Prud'homme
Subject: bug in fsolve() affecting convergence depending on the returned args
Date: Fri, 21 Apr 2006 18:25:41 +0200
User-agent: KMail/1.9.1

Attached you will find the 3 scripts 
 o a test script cranknic_test2

 o the _good script works at all times when executing cranknic_test2
 
 o the _bad script fails starting at N=2^5 when executing cranknic_test2

the only difference between _good and _bad is the fact that in _good I store 
one extra output arg from fsolve()
ie [w info] = fsolve()
instead of just w = fsolve

This is highly suspicious since there is no reason why it should affect the 
outcome of fsolve.
Note that the result give by _good when _bad fails is OK

here is the log
octave-2.9.5:1>  cranknic_test2
get w and info
get w and info OK
get only w
get only w OK
N = 4
get w and info
get w and info OK
get only w
get only w OK
N = 8
get w and info
get w and info OK
get only w
get only w OK
N = 16
get w and info
get w and info OK
get only w
get only w OK
N = 32
get w and info
get w and info OK
get only w
error: fsolve: iteration is not making good progress
error: evaluating assignment expression near line 24, column 7
error: evaluating for command near line 22, column 1
error: called from `cranknic_bad' in file `/tmp/cranknic_bad.m'
error: evaluating for command near line 8, column 1
error: near line 26 of file `/tmp/cranknic_test2.m'

this is 100% reproducible on different octave versions(2.1.x and 2.9.y) on 
different Debian/GNU/Linux distros(stable and unstable)

Best regards
C.
-- 
Christophe Prud'homme
EPFL SB IACS CMCS
MA B2 534 (Bâtiment MA)
Station 8
CH-1015 Lausanne
Tel: +41 (0)21 693 25 47
Fax: +41 (0)21 693 43 03

Attachment: cranknic_bad.m
Description: Text Data

Attachment: cranknic_test2.m
Description: Text Data

Attachment: cranknic_good.m
Description: Text Data


reply via email to

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