matlab求不等式的方法,Matlab解非线性不等式

http://se.mathworks.com/matlabcentral/newsreader/view_thread/300107

作者的问题是,对于下列问题,想找一个feasible

point/solution(可行解)或者是boundary(边界):

3*x1^2 + 2*x2^3 <= 25

​x1^3 + sqrt(x2)

<= 27

​x1>=0

x2>=0.

问题的回答的还是很到位的,归纳起来:

1.可行解可以用lsqnonlin求解

If you are just in search of a feasible

point,transform the inequalities to equalities

byadding or subtracting the square

of a new unknownper inequality and

use e.g. lsqnonlin to

solve.​​

2. ​可行解可以用fmincon求解

finding a single feasible solution is essentially

nobetter than running a general

constrained optimizer (likefmincon)

on the problem. You would simply minimize

aconstant function over the set of

your nonlinear inequalities.​​

亲自用Matlab help fmincon中的例子实验了一下,原例子是min(-x1*x2*x3)

a4c26d1e5885305701be709a3d33442f.png

将目标函数改为常数函数:f

=1,并将初值改为-10,0,0使不满足约束方程​,再运行fmincon,得到:

a4c26d1e5885305701be709a3d33442f.png

3.边界可以用fmincon求解:​​

目标函数----max: x1

​约束条件----s.t.3*x1^2

+ 2*x2^3 <= 25,

​x1^3 + sqrt(x2)

<= 27,

​x1>=0,

x2>=0​

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值