当前位置:网站首页>Matlab linear programming model learning notes
Matlab linear programming model learning notes
2022-06-26 06:53:00 【Yunxi my goddess】
1、MATLAB Standard form of linear programming

2、 Example
(1)

The greater than sign should be converted to the less than sign , That is, both sides become opposite numbers ; The standard type is min, If max, Need to put c Take the negative
c=[2;3;-5];% The coefficients of the objective function , Semicolons separate
a=[-2,5,-1;1,3,1];% The coefficient of inequality , Pay attention to the symbols
b=[-10;12];% The value to the right of the inequality
aeq=[1,1,1];% Equational Aeq
beq=7;% Equational Beq
x=linprog(-c,a,b,aeq,beq,zeros(3,1));% Be careful c Take the negative ,x obtain 3 That's ok 1 Columns of the matrix , namely x1,x2,x3 The value of
value=c'*x;%z=value= coefficient matrix *x Value matrix , So first transpose
(2)

c=[2;3;1];
a=[-1,-4,-2;-3,-2,0];
b=[-8;-6];
[x,y]=linprog(c,a,b,[],[],zeros(3,1));
% here y Is the final result z
边栏推荐
- Temperature alarm
- js-下载图片
- 直播预告丨消防安全讲师培训“云课堂”即将开讲!
- OCA Security Alliance (cybersecurity mesh)
- 解决新版谷歌Chrome浏览器Cookie跨域失效问题
- When vs code uses prettier to format JS, there is a space between the name of the function definition and the parentheses, and ESLIt does not allow this space
- unity之EasyAR使用
- Go language learning notes 1.2- variables
- Lightgbm-- parameter adjustment notes
- 浅析一道经典题
猜你喜欢
![[micro service series] protocol buffer dynamic analysis](/img/86/357d55c77cc67d6413af2de59bf395.png)
[micro service series] protocol buffer dynamic analysis

“试用期避免被辞退“ 指南攻略

STM 32 uses cube to generate Tim to trigger ADC and transmit through DMA

unity之EasyAR使用

宝塔服务器搭建及数据库远程连接

LabVIEW Arduino TCP/IP遠程智能家居系統(項目篇—5)

Solution of garbled code in sparkshell deletion key of SecureCRT

直播预告丨消防安全讲师培训“云课堂”即将开讲!

【微服务系列】Protocol buffer动态解析

LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)
随机推荐
Requirement analysis of personal blog system
Research Report on market supply and demand and strategy of Chinese amyl cinnamaldehyde (ACA) industry
If you meet a female driver who drives didi as an amateur, you can earn 500 yuan a day!
SHOW语句用法补充
Installation and login of MySQL database
[micro service series] protocol buffer dynamic analysis
Format one insert per line using mysqldump- Using mysqldump to format one insert per line?
Interviewer: what is the difference between a test plan and a test plan?
Introduction to the use of TS generics in functions, interfaces and classes
NumPy学习挑战第一关-NumPy的下载与安装
Market development status analysis and investment risk outlook report of China's battery industry 2022-2027
面试官:测试计划和测试方案有什么区别?
Get the first and last days of the current month, and the first and last days of the previous month
unity之EasyAR使用
C# Nuget离线缓存包安装
On a classical problem
Temperature alarm
China polyphenylene oxide Market Development Prospect and Investment Strategy Research Report 2022-2027
Shell编程-用户信息管理
Research Report on market supply and demand and strategy of China's pallet scale industry