24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 1213  |  回复: 0

世纪乘风

银虫 (小有名气)

[求助] 使用fmincon求解老出错,非线性优化

各位高手,我最近使用Matlab中的fmincon求解时,始终运行出错,望高手给小弟帮忙解答,万分感谢。
例子是网络上的例子,我按照其步骤,系统始终出错。
例子网站:http://wenku.baidu.com/view/1f9a08c30c22590102029d9e.html 在第17页
目标函数: min z=-x1*x2*x3
约束条件:x3*x2+x3*x1+x1*x2-75=0


clear
>> x0=[4;5;6];
>> lb=zeros(3,1);
>> [x,fval,exitflag,output,lambda]=fmincon('-x(1)*x(2)*x(3)',x0,[],[],[],[],lb,[],@Ex1012c)
Warning: Trust-region-reflective algorithm does not solve this
type of problem, using active-set algorithm. You could also try
the interior-point or sqp algorithms: set the Algorithm option
to 'interior-point' or 'sqp' and rerun. For more help, see
Choosing the Algorithm in the documentation.
> In fmincon at 472
??? Error using ==> Ex1012c
Too many output arguments.

Error in ==> fmincon at 670
        [ctmp,ceqtmp] = feval(confcn{3},X,varargin{:});

Caused by:
    Failure in initial user-supplied nonlinear constraint
    function evaluation. FMINCON cannot continue.[ Last edited by 世纪乘风 on 2013-7-3 at 10:14 ]
回复此楼

» 本帖附件资源列表

  • 欢迎监督和反馈:小木虫仅提供交流平台,不对该内容负责。
    本内容由用户自主发布,如果其内容涉及到知识产权问题,其责任在于用户本人,如对版权有异议,请联系邮箱:xiaomuchong@tal.com
  • 附件 1 : 1651164Ex1012c.m
  • 2013-07-03 10:14:36, 160 bytes

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 世纪乘风 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 348分环境工程·调剂 +10 吴彦祖24k 2026-04-03 11/550 2026-04-04 14:19 by 无际的草原
[考研] 一志愿211,化学学硕,310分,本科重点双非,求调剂 +7 努力奋斗112 2026-04-04 7/350 2026-04-04 12:16 by 无际的草原
[考研] 070300化学求调剂 +16 小黄鸭宝 2026-03-30 16/800 2026-04-04 11:49 by asdhh1991
[考研] 334求调剂 +8 曾仰之 2026-04-03 8/400 2026-04-04 11:16 by w_xuqing
[考研] 求调剂 +4 xzghyuj 2026-04-04 4/200 2026-04-04 09:51 by 唐沐儿
[考研] 400分求调剂 +3 尴尬且挠头 2026-04-04 3/150 2026-04-04 08:41 by jp9609
[考研] 求调剂机会 +5 意染ivy 2026-04-03 5/250 2026-04-03 15:13 by qoooooo614
[考研] 机械专硕297 +3 Afksy 2026-04-03 3/150 2026-04-03 14:24 by 1753564080
[考研] 一志愿中国科学院大学265求调剂 +9 恬淡ye 2026-03-31 10/500 2026-04-03 11:10 by txp1986
[考研] 270求调剂 +8 小杰pp 2026-03-31 10/500 2026-04-02 12:57 by yulian1987
[考研] 生物学327,求调剂 +5 书上的梅子 2026-04-01 6/300 2026-04-02 06:47 by ilovexiaobin
[考研] 生物与医药考研调剂 +5 铁憨憨123425 2026-03-31 5/250 2026-04-01 18:01 by syh9288
[考研] 311求调剂 +10 李芷新1 2026-03-31 10/500 2026-04-01 14:38 by chenqifeng666
[考研] 267求调剂 +13 uiybh 2026-03-31 13/650 2026-04-01 10:25 by 探123
[考研] 求调剂,一志愿北林食品与营养095500,301分,已过六级,有科研经历 +4 快乐储蓄罐 2026-03-31 4/200 2026-04-01 09:26 by JourneyLucky
[考研] 求调剂:一志愿:南京大学 专业:0705 总分320 ,本科985,四六级已过 +3 lfy760306 2026-03-31 3/150 2026-04-01 01:57 by Creta
[考研] 080200学硕,机械工程专业277分,求带走! +4 瓶子PZ 2026-03-31 4/200 2026-03-31 20:16 by vgtyfty
[考研] 085601英二数二求调剂 总分325 +4 余航航 2026-03-31 4/200 2026-03-31 17:38 by 唐沐儿
[考研] 318求调剂 +10 陈晨79 2026-03-30 10/500 2026-03-31 17:37 by 544594351
[考研] 356求调剂 +3 gysy?s?a 2026-03-28 3/150 2026-03-29 00:33 by 544594351
信息提示
请填处理意见