MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] patternsearch(模式搜索法)用法求助 (https://www.labfans.com/bbs/showthread.php?t=12957)

geohpliu 2011-03-17 07:56

patternsearch(模式搜索法)用法求助
 
用模式搜索法进行参数优化,有3个参数需要优化,下面的代码可以运行,

Objfcn = @Horton_obj % Handle to the objective function.
X0 = [0.002 0.072 0.5]
LB = [0.00001 0.00001 0.00001]; %Lower bound
UB = [1 1 1]; %Upper bound
X = patternsearch (Objfcn,X0, [], [], [], [],LB,UB)

但是我想再加一个限制条件,使最后得出的3个参数还满足:
X(1)+(X(2)-X(1))*exp(-X(3))-0.0047=0,
请问这个条件怎么加啊?
我是matlab新手,敬请高手指点!

anbcjys 2011-03-18 10:49

回复: patternsearch(模式搜索法)用法求助
 
加入等式约束即可 。


所有时间均为北京时间。现在的时间是 12:37

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.