MATLAB详解:线性规划入门与实例

需积分: 50 9 下载量 187 浏览量 更新于2024-07-18 收藏 2.03MB PDF 举报
"《线性规划与MATLAB基础教程》是一本专为印度瓦尔班拉姆印度科学研究所的学生设计的教材,由Shashi Kant Mishra和Bhagwat Ram合著。该书深入浅出地介绍了线性规划的基本概念和方法,包括单纯形法、改进单纯形法、两阶段法、对偶理论、双重单纯形法、互补松弛性以及运输和分配问题。书中包含大量实例,清晰的证明过程,以及实用的MATLAB代码,旨在帮助学生理解和应用这些理论,并为实际从业者提供实用工具。 书中详细讲解了如何在MATLAB这个强大的数学软件平台上进行线性规划的建模、求解和分析。读者可以跟随作者的脚步,学习如何设置目标函数、约束条件,以及如何利用MATLAB的`linprog`函数来解决实际问题。通过实践作业,读者能够逐步掌握线性规划的基本原理,同时提升编程技能。 此外,书中还涉及了线性规划的对偶理论,这是理解优化问题本质的关键。通过对偶问题,读者能更好地理解原始问题的性质,以及为何某些方法(如双重单纯形法)在某些情况下更为有效。书中的互补松弛性原则强调了解决线性规划问题时的最优解必须满足的必要条件,这对于判断解的合理性至关重要。 书中特别关注的运输和分配问题是工业和经济决策中的常见问题,例如生产调度、物流规划等,通过这些实际场景的应用,读者可以将所学理论转化为实际操作策略。 《线性规划与MATLAB基础教程》不仅适合正在攻读工程、经济或管理专业的学生作为教科书,也适合希望扩展其优化技术知识的从业人员。它为读者提供了一个全面且实践导向的学习平台,使得理解和掌握线性规划技术变得既直观又高效。"
2009-06-11 上传
1 Engineering Problem Solving 1 1.1 Problem-Solving Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 ProblemSolving Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Computing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Computing Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Matlab Technical Computing Environment 14 2.1 Workspace,Windows, and Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 ScalarMathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3 BasicMathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.4 Computational Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.5 Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.6 Accuracyand Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3 Files and File Management 37 3.1 FileManagement Definitions and Commands . . . . . . . . . . . . . . . . . . . . . . 37 3.2 Saving and RestoringMatlab Information . . . . . . . . . . . . . . . . . . . . . . . . 39 3.3 ScriptM-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.4 Errors and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.5 Matlab Search Path, PathManagement, and Startup . . . . . . . . . . . . . . . . . . 49 i 4 Trigonometry and ComplexNum bers 51 4.1 Trigonometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.3 Two-Dimensional Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5 Arrays and Array Operations 81 5.1 Vector Array s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 5.2 Matrix Array s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.3 ArrayPlotting Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 6 Mathematical Functions and Applications 101 6.1 Signal Representation, Processing, and Plotting . . . . . . . . . . . . . . . . . . . . . 101 6.2 Poly nomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 6.3 Partial Fraction Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 6.4 Functions of Two Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.5 User-Defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.6 Plotting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 7 DataAnalysis 135 7.1 Maximum andMinimum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.2 Sums and Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 7.3 Statistical Analy sis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 7.4 Random Number Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 8 Selection Programming 155 8.1 Relational and Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8.2 Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 8.3 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 8.4 Selection Statements in User-Defined Functions . . . . . . . . . . . . . . . . . . . . . 169 8.5 Update Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 ii 8.6 Applied ProblemSolving: Speech Signal Analy sis . . . . . . . . . . . . . . . . . . . . 175 9 Vectors, Matrices and Linear Algebra 180 9.1 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 9.2 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 9.3 Solutions to Sy stems of Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . 196 9.4 Applied ProblemSolving: RobotMotion . . . . . . . . . . . . . . . . . . . . . . . . . 202 10 Curve Fitting and Interpolation 207 10.1 MinimumMean-Square Error Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . 207 10.2 Applied Problem Solving: Hydraulic Engineering . . . . . . . . . . . . . . . . . . . . 213 10.3 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 10.4 Applied ProblemSolving: Human Hearing . . . . . . . . . . . . . . . . . . . . . . . . 219 11 Integration and Differentiation 223 11.1 Numerical Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 11.2 Numerical Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 12 Strings, Time, Base Conversion and Bit Operations 239 12.1 Character Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 12.2 Time Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 12.3 Base Conversions and Bit Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 13 Symbolic Processing 250 13.1 Sy mbolic Expressions and Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 13.2 Manipulating Trigonometric Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 257 13.3 Evaluating and Plotting Sy mbolic Expressions . . . . . . . . . . . . . . . . . . . . . 258 13.4 Solving Algebraic and Transcendental Equations . . . . . . . . . . . . . . . . . . . . 259 13.5 Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 13.6 Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266