当前位置:网站首页>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
边栏推荐
- NumPy学习挑战第五关-创建数组
- MySQL delete in without index
- MYSQL(三)
- Research Report on market supply and demand and strategy of natural organic beauty industry in China
- LabVIEW Arduino TCP/IP遠程智能家居系統(項目篇—5)
- 3.pyinstaller module introduction
- OCA Security Alliance (cybersecurity mesh)
- Shell编程-用户信息管理
- 宝塔服务器搭建及数据库远程连接
- Jasminum plug-in of Zotero document management tool
猜你喜欢

MATLAB线性规划模型学习笔记

Live broadcast Preview - fire safety instructor training "cloud class" is about to start!

Turris omnia: an open source router technology favored by hackers

Load balancer does not have available server for client: userservice problem solving

Web technology sharing | webrtc recording video stream

STM 32 使用cube 生成TIM触发ADC并通过DMA传输的问题

【图像融合】基于梯度能量、局部能量、 PCA三种融合规则实现MRI-CT图像融合附matlab代码

分析 NFT 项目的 5 个指标

LabVIEW arduino TCP / IP Remote Intelligent Home System (Project section - 5)

高德地图使用自定义地图无效问题
随机推荐
LabVIEW Arduino TCP/IP远程智能家居系统(项目篇—5)
DS18B20 details
Go learning notes 1.3- data types of variables
MySQL基础用法01
Typescript type
Judgment of SQL null value
C nuget offline cache package installation
China's audio industry competition trend outlook and future development trend forecast report 2022 Edition
Bugku exercise ---misc--- prosperity, strength and democracy
Custom reference formats used by Zotero
Solution of garbled code in sparkshell deletion key of SecureCRT
【图像分割】基于最大主曲率实现视网膜眼底图像中的血管提取附matlab代码
Hudi compilation of data Lake architecture
STM32F1与STM32CubeIDE编程实例-热敏传感器驱动
[004] [stm32] MDK project configuration and commissioning
Solve the problem of cross domain invalidation of cookies in the new version of Google Chrome browser
Mysql操作数据库
高德地图使用自定义地图无效问题
LabVIEW Arduino tcp/ip remote smart home system (project part-5)
I caught a 10-year-old Alibaba test developer in the company. After chatting with him, I realized everything