octave-maintainers
[Top][All Lists]
Advanced

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

typo in ## -*- texinfo -*- in fslove.m?


From: Tatsuro MATSUOKA
Subject: typo in ## -*- texinfo -*- in fslove.m?
Date: Tue, 15 Jun 2010 10:07:31 +0900 (JST)

Hello

In fsolve.m
In the usage top of the ## -*- texinfo -*-,
## @deftypefnx {Function File} address@hidden, @var{fvec}, @var{info}, 
@var{output}, @var{fjac}] =} fsolve
(@var{fcn}, @dots{})

The second argument in the left hand is '@var{fvec}'

However, in the explanation in the term fval is used, for example

## On return, @var{fval} contains the value of the function @var{fcn}
## evaluated at @var{x}, and @var{info} may be one of the following values:

In the sample code the term 'fvec' in the help and also script itself, fvec is 
used but not fval.

I guess that @var{fval} is perhaps to be corrected @var{fvec}.

Am I right?

I think that example with Jacobian in octave/doc/interpreter/nonlin.txi should 
be corrected.
The example is still in the style for Octave 3.0 even in the development source.

@example
@group
function J = jacobian(x)
  J(1,1) =  3*x(2) - 4*x(1);
  J(1,2) =  4*cos(x(2)) + 3*x(1);
  J(2,1) = -2*x(2)^2 - 3*sin(x(1)) + 6*x(1);
  J(2,2) = -4*x(1)*x(2);
endfunction
@end group
@end example

@noindent
The Jacobian can then be used with the following call to @code{fsolve}:

@example
[x, fval, info] = fsolve (@{@@f, @@address@hidden, [1; 2]);
@end example


The above example no longer works on octave 3.2 or later.

http://octave.1599824.n4.nabble.com/fslove-using-Jacobian-td2254038.html#a2254038

Perhaps the example is to be corrected in the manner shown by Thomas Shores in 
the reply to my
inquiry.

Regards

Tatsuro


--------------------------------------
2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/southafrica2010/


reply via email to

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