文档介绍:Courtesy of Thomas F. Weiss. Used with permission.
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
Department of Electrical Engineering
puter Science
Signals and Systems —
INTRODUCTION TO MATLAB — Fall 1999
Thomas F. Weiss
Last modification September 9, 1999
1
Contents
1 Introduction 3
2 Getting Started 3
3 Getting Help from Within MATLAB 4
4 MATLAB Variables — Scalars, Vectors, and Matrices 4
number operations . . . ........................ 4
Generating vectors . . . ............................. 5
Accessing vector elements ............................ 5
5 Matrix Operations 5
Arithmetic matrix operations . . ........................ 6
Relational operations . . ............................. 6
Flow control operations . ............................. 7
Math functions . ................................. 7
6 MATLAB Files 7
M-Files . ..................................... 8
Scripts . . ................................. 8
Functions ................................. 8
Mat-Files ..................................... 9
Postscript Files . ................................. 9
Diary Files ..................................... 10
7 Plotting 10
Simple mands ............................ 11
Customization of plots . ............................. 11
8 Signals and mands 11
Polynomials . . . ................................. 11
Laplace and Z Transforms ............................ 12
Frequency responses . . ............................. 13
Fourier transforms and filtering . ........................ 13
9 Examples of Usage 13
Find pole-zero diagram, bode diagram, step response from system function . 13
Simple solution . ............................. 14
Customized solution . . . ........................ 14
Locus of roots of a polynomial . . ........................ 16
Response of an LTI system to an input . .............