[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help-octave Digest, Vol 45, Issue 10
From: |
Bart Vandewoestyne |
Subject: |
Re: Help-octave Digest, Vol 45, Issue 10 |
Date: |
Mon, 7 Dec 2009 20:19:42 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Dec 07, 2009 at 09:02:51AM -0600, address@hidden wrote:
>
> The style of supplying Jacobian is not supported in the 3.2 version of
> fsolve. Instead, one should use the Matlab-compatible style:
>
> function [y,J] = f_3d(x)
>
> y(1) = 16*x(1)^4 + 16*x(2)^4 + x(3)^4 - 16;
> y(2) = x(1)^2 + x(2)^2 + x(3)^2 - 3;
> y(3) = x(1)^3 - x(2);
>
> if (nargout > 1)
> J = zeros(3,3);
> J = [64*x(1)^3 64*x(2)^3 4*x(3)^3; ...
> 2*x(1) 2*x(2) 2*x(3); ...
> 3*x(1)^2 -1 0];
> endif
>
>
> I think this style is preferable not only because of
> Matlab-compatibility, but also because y and J are usually closely
> related. It wouldn't be hard to support also the old version, but the
> fact is that it is not there, because nobody asked for it.
OK. Thanks. In the meanwhile, i also found that this was the
solution to my problem.
> Apparently the manual wasn't updated. But it has the docstring
> included; so you should pay attention to that.
I'm afraid I don't understande what you mean here. Can you
explain a bit?
Kind regards,
Bart
--
"Share what you know. Learn what you don't."
- Re: Help-octave Digest, Vol 45, Issue 10,
Bart Vandewoestyne <=