没有合适的资源?快使用搜索试试~ 我知道了~
首页Getting Started with MATLAB
Getting Started with MATLAB
4星 · 超过85%的资源 需积分: 9 56 下载量 79 浏览量
更新于2023-03-03
评论
收藏 2.46MB PDF 举报
Getting Started with MATLAB, which introduces you to MATLAB. It covers all the primary MATLAB features at a high level, including plenty of examples to help you to learn the material quickly.
资源详情
资源评论
资源推荐
Computation
Visualization
Programming
Getting Started with MATLAB
Version 6
MATLAB
®
The Language of Technical Computing
How to Contact The MathWorks:
www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
support@mathworks.com Technical support
suggest@mathworks.com Product enhancement suggestions
bugs@mathworks.com Bug reports
doc@mathworks.com Documentation error reports
service@mathworks.com Order status, license renewals, passcodes
info@mathworks.com Sales, pricing, and general information
508-647-7000 Phone
508-647-7001 Fax
The MathWorks, Inc. Mail
3 Apple Hill Drive
Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site.
Getting Started with MATLAB
COPYRIGHT 1984 - 2001 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or repro-
duced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by
or for the federal government of the United States. By accepting delivery of the Program, the government
hereby agrees that this software qualifies as "commercial" computer software within the meaning of FAR
Part 12.212, DFARS Part 227.7202-1, DFARS Part 227.7202-3, DFARS Part 252.227-7013, and DFARS Part
252.227-7014. The terms and conditions of The MathWorks, Inc. Software License Agreement shall pertain
to the government’s use and disclosure of the Program and Documentation, and shall supersede any
conflicting contractual terms or conditions. If this license fails to meet the government’s minimum needs or
is inconsistent in any respect with federal procurement law, the government agrees to return the Program
and Documentation, unused, to MathWorks.
MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and
Target Language Compiler is a trademark of The MathWorks, Inc.
Other product or brand names are trademarks or registered trademarks of their respective holders.
Printing History: December 1996 First printing For MATLAB 5
May 1997 Second printing For MATLAB 5.1
September 1998 Third printing For MATLAB 5.3
September 2000 Fourth printing Revised for MATLAB 6, Release 12
June 2001 Online only Minor update for MATLAB 6.1,
Release 12.1
i
Contents
1
Introduction
What Is MATLAB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
The MATLAB System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
MATLAB Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
MATLAB Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
2
Development Environment
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Starting and Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
MATLAB Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Desktop Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Command Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Launch Pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Help Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Current Directory Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Workspace Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Editor/Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Other Development Environment Features . . . . . . . . . . . . 2-15
ii Contents
3
Manipulating Matrices
Matrices and Magic Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Entering Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
sum, transpose, and diag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Subscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
The Colon Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
The magic Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Examples of Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Working with Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Generating Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
The load Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
M-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
Deleting Rows and Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
More About Matrices and Arrays . . . . . . . . . . . . . . . . . . . . . . 3-18
Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Multivariate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Scalar Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Logical Subscripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
The find Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
Controlling Command Window Input and Output . . . . . . . 3-28
The format Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Suppressing Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Entering Long Command Lines . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Command Line Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
iii
4
Graphics
Basic Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Creating a Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Multiple Data Sets in One Graph . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Specifying Line Styles and Colors . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Plotting Lines and Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Imaginary and Complex Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Adding Plots to an Existing Graph . . . . . . . . . . . . . . . . . . . . . . . 4-7
Figure Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Multiple Plots in One Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Controlling the Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Axis Labels and Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Saving a Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Editing Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Interactive Plot Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Using Functions to Edit Graphs . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Using Plot Editing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Using the Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Mesh and Surface Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Visualizing Functions of Two Variables . . . . . . . . . . . . . . . . . . 4-18
Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Printing Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Handle Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Graphics Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Setting Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Finding the Handles of Existing Objects . . . . . . . . . . . . . . . . . 4-31
Graphics User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Graphical User Interface Design Tools . . . . . . . . . . . . . . . . . . . 4-33
Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
Erase Mode Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
Creating Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
剩余135页未读,继续阅读
kidstory
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5