[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nonlinear least square fitting
From: |
Michael Creel |
Subject: |
Re: Nonlinear least square fitting |
Date: |
Thu, 19 Jul 2007 12:29:54 +0200 |
On 7/18/07, Joh, Jungwoo <address@hidden> wrote:
Hi,
I have found one version for nonlinear least square fitting:
http://velveeta.che.wisc.edu/octave/lists/archive//help-octave.1999/msg0
0770.html
, but it only supports unbounded fittings. I want to set lower and upper
bound for this. Does anyone know if there is any other versions for
that?
Thanks,
Jungwoo
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Octave 2.9.12 has an sqp function that does minimization with bounds.
The following script finds that xopt=5, for example.
M.
1;
function a = obj(x)
a = x^2;
endfunction
function b = bound(x)
b = x-5;
endfunction
xin = 10;
[xopt, obj, info, iter, nf, lambda] = sqp(xin, @obj, @bound, [])