From: Guilherme Kobara on 11 Feb 2010 14:58 Hi, I would like to know if how would fimisearch work with a set of simultaneous equations, for example: function w=something(...) S=fminsearch(@nonlinear,x0) function F = nonlinear(x,a,b,a1,b1,A,B) F =- [ a*x(1) + b*x(2) - A a1*x(1).^2 +c - B] would it minimize the two lines of F simultaneously?? What if wanted to minimize only the first line and use the second one as a restriction? The problem is that I want to minize a function that has a variable that is defined in another function that has endogeneity problems. I would really appreciate if anyone could help me. thanks.
From: John D'Errico on 11 Feb 2010 15:54 "Guilherme Kobara" <gkobara(a)hotmail.com> wrote in message <hl1ngc$534$1(a)fred.mathworks.com>... > Hi, I would like to know if how would fimisearch work with a set of simultaneous equations, for example: > > > function w=something(...) > > S=fminsearch(@nonlinear,x0) > > function F = nonlinear(x,a,b,a1,b1,A,B) > > F =- [ a*x(1) + b*x(2) - A > a1*x(1).^2 +c - B] > > would it minimize the two lines of F simultaneously?? What if wanted to minimize only the first line and use the second one as a restriction? > > The problem is that I want to minize a function that has a variable that is defined in another function that has endogeneity problems. > > I would really appreciate if anyone could help me. > thanks. fminsearch minimizes a SCALAR function of one or more variables. It does not minimize subject to general constraints, or even bound constraints (although my fminsearchbnd does solve a problem subject to bound constraints.) Fminsearch does not do multi-criteria optimization, so if you have more than one objective, it will get upset at you for good reason. John
From: Guilherme Kobara on 11 Feb 2010 18:45 "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <hl1qpc$7id$1(a)fred.mathworks.com>... > "Guilherme Kobara" <gkobara(a)hotmail.com> wrote in message <hl1ngc$534$1(a)fred.mathworks.com>... > > Hi, I would like to know if how would fimisearch work with a set of simultaneous equations, for example: > > > > > > function w=something(...) > > > > S=fminsearch(@nonlinear,x0) > > > > function F = nonlinear(x,a,b,a1,b1,A,B) > > > > F =- [ a*x(1) + b*x(2) - A > > a1*x(1).^2 +c - B] > > > > would it minimize the two lines of F simultaneously?? What if wanted to minimize only the first line and use the second one as a restriction? > > > > The problem is that I want to minize a function that has a variable that is defined in another function that has endogeneity problems. > > > > I would really appreciate if anyone could help me. > > thanks. > > fminsearch minimizes a SCALAR function of one > or more variables. It does not minimize subject > to general constraints, or even bound constraints > (although my fminsearchbnd does solve a problem > subject to bound constraints.) Fminsearch does not > do multi-criteria optimization, so if you have more > than one objective, it will get upset at you for good > reason. > > John ok, thanks John, but do you have any suggestions on how can i minimize this type of function?
From: Alan Weiss on 12 Feb 2010 07:43 Guilherme Kobara wrote: > "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message > <hl1qpc$7id$1(a)fred.mathworks.com>... >> "Guilherme Kobara" <gkobara(a)hotmail.com> wrote in message >> <hl1ngc$534$1(a)fred.mathworks.com>... >> > Hi, I would like to know if how would fimisearch work with a set of >> simultaneous equations, for example: >> > > > function w=something(...) >> > > S=fminsearch(@nonlinear,x0) >> > > function F = nonlinear(x,a,b,a1,b1,A,B) >> > > F =- [ a*x(1) + b*x(2) - A >> > a1*x(1).^2 +c - B] >> > > would it minimize the two lines of F simultaneously?? What if >> wanted to minimize only the first line and use the second one as a >> restriction? >> > > The problem is that I want to minize a function that has a >> variable that is defined in another function that has endogeneity >> problems. > > I would really appreciate if anyone could help me. >> > thanks. >> >> fminsearch minimizes a SCALAR function of one >> or more variables. It does not minimize subject >> to general constraints, or even bound constraints >> (although my fminsearchbnd does solve a problem >> subject to bound constraints.) Fminsearch does not >> do multi-criteria optimization, so if you have more >> than one objective, it will get upset at you for good >> reason. >> >> John > > > > ok, thanks John, but do you have any suggestions on how can i minimize > this type of function? I am not sure I understand what you are trying to do, but perhaps you can get some information by looking at what Optimization Toolbox solvers can handle: http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-18.html#brhkghv-21 Alan Weiss MATLAB mathematical toolbox documentation
|
Pages: 1 Prev: Image conversion Next: How to add labels to nodes displayed by a Treeplot |