[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help with nelder_mead_min.m
From: |
Григорий Полётов |
Subject: |
Re: Need help with nelder_mead_min.m |
Date: |
Wed, 25 Nov 2009 18:16:38 +0300 |
Thx for your answers!
So, as far as I can see, there is a key need for the function to be minimized act on a vector argument?
help nelder_mead_min
[snip]
args : list : Arguments passed to f.
or matrix : f's only argument
[snip]
Here args is simply a guess value to start with? Right?
Best regards,
Grigory
2009/11/24
<address@hidden>
Hello,
something like
octave:408> function val = foo (xyz), val = sum (xyz .^ 2); endfunction
octave:409> help nelder_mead_min
[snip]
### Start nelder_mead_min() from a random point
octave:410> [xyz0, val0, nev] = nelder_mead_min ("foo", randn(1,3))
xyz0 =
2.1237e-08 1.0243e-08 -4.4610e-09
val0 = 5.7582e-16
nev = 201
### Start nelder_mead_min() from the minimum
octave:411> [xyz0, val0, nev] = nelder_mead_min ("foo", [0 0 0])
xyz0 =
0 0 0
val0 = 0
nev = 236
Hth,
Etienne
Quoting ???????? ???????
<address@hidden> (Mon, 23 Nov 2009 21:43:57 +0300):
Hi all!
I can't figure out how to work with this function. I will be very
glad if one could explain the subject.
For an example lets see the problem.
function y = foo (x, y, z)
y = x**2 + y**2 + z**2;
endfunction
I need to find a minima of the foo in [-1;1]*[-1;1]*[-1;1] region.
I know the answer, but how I must set up an options and arguments
for nelder_mead_min.m?
Best regards,
Grigory
--
http://www.isr.ist.utl.pt/~etienne
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.