下载此文档

Use MATLAB to solve linear programs Optimization Method 最优化方法经典教材课件.ppt


文档分类:通信/电子 | 页数:约9页 举报非法文档有奖
1/9
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/9 下载此文档
文档列表 文档介绍
UseMATLABtosolvelinearprogramsLIXiao-leiMATLABformatforlinearprogramsMATLABusesthefollowingformatforlinearprograms:minz=≤bAeq=beq (1)x≥lx≤uCommandformatAlinearprogramintheformatofequation(1)mand:x=linprog(f,A,b,Aeq,beq,l,u)SimpleexampleSupposewewanttosolvethefollowinglinearprogramusingMATLAB:maxz=4x1+2x2++x2≤1x1+2x3≤2x1+x2+x3=1x1≤1x2≤1x3≤2x1≥0;x2≥0;x3≥paringtheaboveLPwiththeformatgivenin(1)weget:SimpleexampleInputthevariablesintoMATLAB:>>f=-[4;2;1];>>A=[210;102];>>b=[1;2];>>Aeq=[111];>>beq=[1];>>l=[0;0;0];>>u=[1;1;2];SimpleexampleSolvethelinearprogramusingMATLAB:>>x=linprog(f,A,b,Aeq,beq,l,u)Andyoushouldseethefollowing:=?Forexample,:>>l=[];m

Use MATLAB to solve linear programs Optimization Method 最优化方法经典教材课件 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数9
  • 收藏数0 收藏
  • 顶次数0
  • 上传人aena45
  • 文件大小45 KB
  • 时间2020-07-01