当前位置:网站首页>[matlab] solve nonlinear programming

[matlab] solve nonlinear programming

2022-07-01 06:49:00 Embedded workplace

Catalog

1、 Problem description

 2、 problem solving


1、 Problem description

 2、 problem solving

To write M file test.m

function g=test(x);
M=50000;
f=x(1)^2+x(2)^2+8;
g=f-M*min(x(1),0)-M*min(x(2),0)-M*min(x(1)^2-x(2),0)+...
M*abs(-x(1)-x(2)^2+2);

Or use Matlab Programming of minimum and maximum functions of matrix test.m as follows :

fun
原网站

版权声明
本文为[Embedded workplace]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010644145744.html