实例介绍
【实例简介】Matlab Primer
【实例截图】
【核心代码】
Quick Start 1 MATLAB Product Description ........................... 1-2 Key Features ..................................... 1-2 Desktop Basics ....................................... 1-3 Matrices and Arrays .................................. 1-5 Array Indexing ...................................... 1-10 Workspace Variables ................................. 1-12 Text and Characters .................................. 1-13 Text in String Arrays ............................... 1-13 Data in Character Arrays ........................... 1-14 Calling Functions .................................... 1-15 2-D and 3-D Plots .................................... 1-17 Programming and Scripts ............................. 1-24 Scripts ......................................... 1-24 Live Scripts ..................................... 1-25 Loops and Conditional Statements .................... 1-26 Script Locations .................................. 1-27 Help and Documentation ............................. 1-28 v Contents Language Fundamentals 2 Matrices and Magic Squares ........................... 2-2 About Matrices .................................... 2-2 Entering Matrices .................................. 2-4 sum, transpose, and diag ............................ 2-5 The magic Function ................................ 2-7 Generating Matrices ................................ 2-8 Expressions ......................................... 2-9 Variables ........................................ 2-9 Numbers ....................................... 2-10 Matrix Operators ................................. 2-11 Array Operators .................................. 2-11 Functions ....................................... 2-13 Examples of Expressions ........................... 2-14 Entering Commands ................................. 2-16 The format Function ............................... 2-16 Suppressing Output ............................... 2-17 Entering Long Statements .......................... 2-17 Command Line Editing ............................. 2-18 Indexing ........................................... 2-19 Subscripts ...................................... 2-19 The Colon Operator ............................... 2-20 Concatenation ................................... 2-21 Deleting Rows and Columns ......................... 2-22 Scalar Expansion ................................. 2-23 Logical Subscripting ............................... 2-23 The find Function ................................. 2-24 Types of Arrays ...................................... 2-26 Multidimensional Arrays ............................ 2-26 Cell Arrays ...................................... 2-28 Characters and Text ............................... 2-30 Structures ...................................... 2-33 vi Contents Mathematics 3 Linear Algebra ....................................... 3-2 Matrices in the MATLAB Environment .................. 3-2 Systems of Linear Equations ......................... 3-13 Factorizations .................................... 3-25 Powers and Exponentials ........................... 3-32 Eigenvalues ..................................... 3-35 Singular Values .................................. 3-39 Operations on Nonlinear Functions ..................... 3-44 Function Handles ................................. 3-44 Function Functions ................................ 3-44 Multivariate Data .................................... 3-48 Data Analysis ....................................... 3-49 Introduction ..................................... 3-49 Preprocessing Data ............................... 3-49 Summarizing Data ................................ 3-55 Visualizing Data .................................. 3-59 Modeling Data ................................... 3-70 Graphics 4 Basic Plotting Functions ............................... 4-2 Creating a Plot .................................... 4-2 Plotting Multiple Data Sets in One Graph ................ 4-4 Specifying Line Styles and Colors ...................... 4-6 Plotting Lines and Markers ........................... 4-7 Graphing Imaginary and Complex Data .................. 4-9 Adding Plots to an Existing Graph ..................... 4-10 Figure Windows .................................. 4-12 Displaying Multiple Plots in One Figure ................ 4-12 Controlling the Axes ............................... 4-13 Adding Axis Labels and Titles ........................ 4-15 Saving Figures ................................... 4-16 Saving Workspace Data ............................ 4-17 vii Creating Mesh and Surface Plots ....................... 4-19 About Mesh and Surface Plots ....................... 4-19 Visualizing Functions of Two Variables ................. 4-19 Display Images ...................................... 4-25 Image Data ...................................... 4-25 Reading and Writing Images ......................... 4-27 Printing Graphics ................................... 4-28 Overview of Printing ............................... 4-28 Printing from the File Menu ......................... 4-28 Exporting the Figure to a Graphics File ................ 4-28 Using the Print Command ........................... 4-29 Working with Graphics Objects ........................ 4-30 Graphics Objects ................................. 4-30 Setting Object Properties ........................... 4-33 Functions for Working with Objects ................... 4-35 Passing Arguments ................................ 4-36 Finding the Handles of Existing Objects ................ 4-37 Programming 5 Control Flow ......................................... 5-2 Conditional Control — if, else, switch ................... 5-2 Loop Control — for, while, continue, break ............... 5-5 Program Termination — return ........................ 5-7 Vectorization ..................................... 5-7 Preallocation ..................................... 5-8 Scripts and Functions ................................. 5-9 Overview ........................................ 5-9 Scripts ......................................... 5-10 Functions ....................................... 5-11 Types of Functions ................................ 5-13 Global Variables .................................. 5-15 Command vs. Function Syntax ....................... 5-15 viii Contents
好例子网口号:伸出你的我的手 — 分享!
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论