[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimization functions
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: optimization functions |
Date: |
Thu, 29 Jul 2010 09:09:59 -0500 |
On 28 July 2010 03:06, aleksandra <address@hidden> wrote:
> Does anyone knows how to use fminsearch and lsqnonlin in octave? I
> noticed that there are more arguments than in matlab (?), I don't
> have idea how to implement options for fitting like in matlab?
Many of the Octave-Forge functions are in various states of
maintenance and it's often necessary to consult the source itself in
cases where the documenation is lacking. In the case of fminsearch,
the source is simply this:
function [x fval] = fminsearch(funfun, X0, options, grad, varargin)
if (nargin == 0); usage('[x fval] = fminsearch(funfun, X0,
options, grad, varargin)'); end
if (nargin < 3); options=[]; end
if (nargin < 4); grad=[]; end
if (nargin < 5); varargin={}; end
x = fmins(funfun, X0, options, grad, varargin{:});
fval = feval(funfun, x, varargin{:});
endfunction;
so you see it's just a wrapper to fmins, which seems to be more
thoroughly documented.
I cannot find lsqnonlin here,
http://octave.sourceforge.net/functions_by_alpha.php?letter=L
so I'm guessing that it's a Matlab function, and by its name it does
nonlinear least squares. The leasqr function also in the 'Forge's
optim package does the same and does have extensive documenation.
HTH,
- Jordi G. H.