[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## fsolve

**From**: |
Francesco Potorti` |

**Subject**: |
fsolve |

**Date**: |
Mon, 07 Aug 1995 20:50 +0100 (MET) |

Hi, is there someone willing to help me to use fsolve?
It always tells me that the iteration is not making good progress and
stops after 15 iterations, nor there seems to be any way of making it
iterate longer. I put a debugging printf inside the function that
fsolve calls, so I can see the argument it is called with (a two
variable vector).
I call fsolve with an initial value of [4; 1] and the output is
quite strange:
x(1)=4, x(2)=1
x(1)=4, x(2)=1
x(1)=4, x(2)=1
x(1)=-180.366, x(2)=369.794
x(1)=-88.1831, x(2)=185.397
x(1)=4, x(2)=1
x(1)=4, x(2)=1
x(1)=-180.366, x(2)=369.794
x(1)=-88.1831, x(2)=185.397
x(1)=-42.0916, x(2)=93.1985
x(1)=-19.0458, x(2)=47.0993
x(1)=-7.52289, x(2)=24.0496
x(1)=-1.76144, x(2)=12.5248
x(1)=1.11928, x(2)=6.76241
x(1)=2.55964, x(2)=3.8812
Why does fsolve call three times the function with the initial value?
And then back two more times?
After this run, I tried to make it go on by putting an initial value
of [2.5; 4] and I got this:
x(1)=2.5, x(2)=4
x(1)=2.5, x(2)=4
x(1)=2.5, x(2)=4
x(1)=-208.422, x(2)=425.915
x(1)=-102.961, x(2)=214.957
x(1)=2.5, x(2)=4
x(1)=2.5, x(2)=4
x(1)=-208.422, x(2)=425.915
x(1)=-102.961, x(2)=214.957
x(1)=-50.2305, x(2)=109.479
x(1)=-23.8652, x(2)=56.7393
x(1)=-10.6826, x(2)=30.3697
x(1)=-4.09131, x(2)=17.1848
x(1)=-0.795656, x(2)=10.5924
x(1)=0.852172, x(2)=7.29621
both times fsolve stopped returning the same values I gave as starting
point and info=3, meaning "iteration is not making good progress".
Any ideas?
--
Francesco Potorti` | address@hidden (Internet)
researcher at | 39369::pot (DECnet)
CNUCE-CNR, Pisa, Italy | +39-50-593203 (voice) 904052 (fax)

**fsolve**,
*Francesco Potorti`* **<=**
**Re: fsolve**, *Ted Harding*, `1995/08/07`
**fsolve**, *Francesco Potorti`*, `1995/08/08`
**Re: fsolve**, *Ted Harding*, `1995/08/08`
**fsolve**, *Francesco Potorti`*, `1995/08/08`
**Re: fsolve**, *John Utz*, `1995/08/09`
**Re: fsolve**, *Ted Harding*, `1995/08/09`
**Re: fsolve --- books on numerical analysis**, *Martin Maechler*, `1995/08/09`
**fsolve --- books on numerical analysis**, *Francesco Potorti`*, `1995/08/09`