[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fsolve test failure
From: |
Jaroslav Hajek |
Subject: |
Re: fsolve test failure |
Date: |
Thu, 29 Jan 2009 21:13:27 +0100 |
On Thu, Jan 29, 2009 at 8:57 PM, John W. Eaton <address@hidden> wrote:
> On 28-Jan-2009, Jaroslav Hajek wrote:
>
> | I've uploaded a patch that relaxes the strict scaling:
> |
> |
> | this makes the results with default settings more plausible:
> | function retval = f (p)
> | x = p(1);
> | y = p(2);
> | z = p(3);
> | w = p(4);
> | retval = zeros (4, 1);
> | retval(1) = 3*x + 4*y + exp (z + w) - 1.007;
> | retval(2) = 6*x - 4*y + exp (3*z + w) - 11;
> | retval(3) = x^4 - 4*y^2 + 6*z - 8*w - 20;
> | retval(4) = x^2 + 2*y^3 + z - w - 4;
> | endfunction
> |
> | x_opt = [ -0.767297326653401, 0.590671081117440, 1.47190018629642,
> | -1.52719341133957 ];
> | tol = 1.0e-5;
> | [x, fval, info, out] = fsolve (@f, [-1, 1, 2, -1])
> | [x, fval, info, out] = fsolve (@f, [-1, 1, 2, -1], optimset
> | ("Updating", "off"))
>
> In this test, what is the purpose of tol? I think that confused me as
> well as I didn't notice at first that it is unused. Was it intended
> to be used in some way?
>
I think in the test tol is used in the subsequent assert statements.
Here, it remained just because I lazily copied the code.
Maybe the tests should be modified so that they reflect fsolve's
terminating condition. That needs querying the jacobian.
> | PS. I'll also commit the patch to make optimset/optimget case insensitive.
>
> OK.
>
I slightly hesitated with this - what, in your opinion, is the better
way to proceed?
1. let both optimset & optimget convert their args to lowercase.
2. leave optimset untouched, and write optimget in such a way that the
query is case-insensitive.
1. is easier and faster, because 2. probably requires looping through
the fields, but does not preserve case of options set.
> Thanks,
>
> jwe
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- fsolve test failure, John W. Eaton, 2009/01/27
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/27
- Re: fsolve test failure, Ben Abbott, 2009/01/27
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/27
- Re: fsolve test failure, John W. Eaton, 2009/01/27
- Message not available
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure,
Jaroslav Hajek <=
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/29
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/29
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/29
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure, John W. Eaton, 2009/01/29
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/30
- Re: fsolve test failure, Jaroslav Hajek, 2009/01/30