كتاب سلسلة تمارين وحلول في ال Matlabالكتب العلمية

كتاب سلسلة تمارين وحلول في ال Matlab

سلسلة تمارين وحلول في ال Matlab مع الشفرة المصدرية لحل التمارين. INTRODUCTION TO MATLAB FOR ENGINEERING STUDENTS David Houcque Northwestern University (version 1.2, August 2005) Contents 1 Tutorial lessons 1 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Basic features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 A minimum MATLAB session . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3.1 Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3.2 Using MATLAB as a calculator . . . . . . . . . . . . . . . . . . . . . 4 1.3.3 Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.1 Creating MATLAB variables . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.2 Overwriting variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.3 Error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.4 Making corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.5 Controlling the hierarchy of operations or precedence . . . . . . . . . 6 1.4.6 Controlling the appearance of floating point number . . . . . . . . . . 8 1.4.7 Managing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4.8 Keeping track of your work session . . . . . . . . . . . . . . . . . . . 9 1.4.9 Entering multiple statements per line . . . . . . . . . . . . . . . . . . 9 1.4.10 Miscellaneous commands . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.11 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2 Tutorial lessons 2 12 2.1 Mathematical functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 i 2.2 Basic plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.2 Creating simple plots . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.3 Adding titles, axis labels, and annotations . . . . . . . . . . . . . . . 15 2.2.4 Multiple data sets in one plot . . . . . . . . . . . . . . . . . . . . . . 16 2.2.5 Specifying line styles and colors . . . . . . . . . . . . . . . . . . . . . 17 2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5 Matrix generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5.1 Entering a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.5.2 Entering a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.5.3 Matrix indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.5.4 Colon operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.5.5 Linear spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.5.6 Colon operator in a matrix . . . . . . . . . . . . . . . . . . . . . . . . 22 2.5.7 Creating a sub-matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.5.8 Deleting row or column . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.5.9 Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.5.10 Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.5.11 Transposing a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.5.12 Concatenating matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.5.13 Matrix generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.5.14 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3 Array operations and Linear equations 30 3.1 Array operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.1.1 Matrix arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30 3.1.2 Array arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30 3.2 Solving linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.1 Matrix inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ii 3.2.2 Matrix functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4 Introduction to programming in MATLAB 35 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2 M-File Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.2.2 Script side-effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.3 M-File functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3.1 Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . . 38 4.3.2 Input and output arguments . . . . . . . . . . . . . . . . . . . . . . . 40 4.4 Input to a script file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.5 Output commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 5 Control flow and operators 43 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.2 Control flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.2.1 The ‘‘if...end’’ structure . . . . . . . . . . . . . . . . . . . . . . . 43 5.2.2 Relational and logical operators . . . . . . . . . . . . . . . . . . . . . 45 5.2.3 The ‘‘for...end’’ loop . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2.4 The ‘‘while...end’’ loop . . . . . . . . . . . . . . . . . . . . . . . 46 5.2.5 Other flow structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.2.6 Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.3 Saving output to a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6 Debugging M-files 49 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.2 Debugging process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.2.1 Preparing for debugging . . . . . . . . . . . . . . . . . . . . . . . . . 50 6.2.2 Setting breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 iii 6.2.3 Running with breakpoints . . . . . . . . . . . . . . . . . . . . . . . . 50 6.2.4 Examining values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.2.5 Correcting and ending debugging . . . . . . . . . . . . . . . . . . . . 51 6.2.6 Ending debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.2.7 Correcting an M-file . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 A Summary of commands 53 B Release notes for Release 14 with Service Pack 2 58 B.1 Summary of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 B.2 Other changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 B.3 Further details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 C Main characteristics of MATLAB 62 C.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 C.2 Strengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 C.3 Weaknesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 C.4 Competition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 iv List of Tables 1.1 Basic arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Hierarchy of arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 Elementary functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2 Predefined constant values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3 Attributes for plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4 Elementary matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.5 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.1 Array operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2 Summary of matrix and array operations . . . . . . . . . . . . . . . . . . . . 32 3.3 Matrix functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.1 Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.2 Difference between scripts and functions . . . . . . . . . . . . . . . . . . . . 39 4.3 Example of input and output arguments . . . . . . . . . . . . . . . . . . . . 40 4.4 disp and fprintf commands . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5.1 Relational and logical operators . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2 Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 A.1 Arithmetic operators and special characters . . . . . . . . . . . . . . . 53 A.2 Array operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 A.3 Relational and logical operators . . . . . . . . . . . . . . . . . . . . . . 54 A.4 Managing workspace and file commands . . . . . . . . . . . . . . . . . 55 A.5 Predefined variables and math constants . . . . . . . . . . . . . . . . . 55 v A.6 Elementary matrices and arrays . . . . . . . . . . . . . . . . . . . . . . 56 A.7 Arrays and Matrices: Basic information . . . . . . . . . . . . . . . . . 56 A.8 Arrays and Matrices: operations and manipulation . . . . . . . . . . 56 A.9 Arrays and Matrices: matrix analysis and linear equations
-
من كتب علم الرياضيات - مكتبة الكتب العلمية.

وصف الكتاب : سلسلة تمارين وحلول في ال Matlab مع الشفرة المصدرية لحل التمارين.

INTRODUCTION TO MATLAB FOR
ENGINEERING STUDENTS
David Houcque
Northwestern University
(version 1.2, August 2005)

Contents

1
Tutorial lessons 1
1
1.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2
Basic features
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3
A minimum MATLAB session
. . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.1 Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.2 Using MATLAB as a calculator . . . . . . . . . . . . . . . . . . . . . 4
1.3.3 Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4
Getting started
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.1 Creating MATLAB variables . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.2 Overwriting variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.3 Error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.4 Making corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.5 Controlling the hierarchy of operations or precedence . . . . . . . . . 6
1.4.6 Controlling the appearance of floating point number . . . . . . . . . . 8
1.4.7 Managing the workspace . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.8 Keeping track of your work session . . . . . . . . . . . . . . . . . . . 9
1.4.9 Entering multiple statements per line . . . . . . . . . . . . . . . . . . 9
1.4.10 Miscellaneous commands . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.11 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2
Tutorial lessons 2
12
2.1
Mathematical functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
i
2.2
Basic plotting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.2 Creating simple plots . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.3 Adding titles, axis labels, and annotations . . . . . . . . . . . . . . . 15
2.2.4 Multiple data sets in one plot . . . . . . . . . . . . . . . . . . . . . . 16
2.2.5 Specifying line styles and colors . . . . . . . . . . . . . . . . . . . . . 17
2.3
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5
Matrix generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.1 Entering a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.2 Entering a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.3 Matrix indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5.4 Colon operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.5 Linear spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.6 Colon operator in a matrix . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.7 Creating a sub-matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.5.8 Deleting row or column . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.9 Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.10 Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.11 Transposing a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.12 Concatenating matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.13 Matrix generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.5.14 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.6
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3
Array operations and Linear equations
30
3.1
Array operations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.1 Matrix arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.2 Array arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 Solving linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 Matrix inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
ii
3.2.2 Matrix functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4
Introduction to programming in MATLAB
35
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 M-File Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2.2 Script side-effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.3 M-File functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3.1 Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . . 38
4.3.2 Input and output arguments . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Input to a script file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.5 Output commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.6
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5
Control flow and operators
43
5.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2
Control flow
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2.1 The
‘‘if...end’’
structure . . . . . . . . . . . . . . . . . . . . . . . 43
5.2.2 Relational and logical operators . . . . . . . . . . . . . . . . . . . . . 45
5.2.3 The
‘‘for...end’’
loop . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.2.4 The
‘‘while...end’’
loop . . . . . . . . . . . . . . . . . . . . . . . 46
5.2.5 Other flow structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2.6 Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3
Saving output to a file
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6
Debugging M-files
49
6.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2
Debugging process
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2.1 Preparing for debugging . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2.2 Setting breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
iii
6.2.3 Running with breakpoints . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2.4 Examining values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.2.5 Correcting and ending debugging . . . . . . . . . . . . . . . . . . . . 51
6.2.6 Ending debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.2.7 Correcting an M-file . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A
Summary of commands
53
B
Release notes for Release 14 with Service Pack 2
58
B.1
Summary of changes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
B.2
Other changes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
B.3
Further details
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
C
Main characteristics of MATLAB
62
C.1
History
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
C.2
Strengths
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
C.3
Weaknesses
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
C.4
Competition
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
iv
List of Tables
1.1 Basic arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Hierarchy of arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 Elementary functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Predefined constant values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Attributes for
plot
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Elementary matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.5 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.1 Array operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 Summary of matrix and array operations . . . . . . . . . . . . . . . . . . . . 32
3.3 Matrix functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.1 Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2 Difference between scripts and functions . . . . . . . . . . . . . . . . . . . . 39
4.3 Example of input and output arguments . . . . . . . . . . . . . . . . . . . . 40
4.4
disp
and
fprintf
commands . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1 Relational and logical operators . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.2 Operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
A.1
Arithmetic operators and special characters
. . . . . . . . . . . . . . . 53
A.2
Array operators
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
A.3
Relational and logical operators
. . . . . . . . . . . . . . . . . . . . . . 54
A.4
Managing workspace and file commands
. . . . . . . . . . . . . . . . . 55
A.5
Predefined variables and math constants
. . . . . . . . . . . . . . . . . 55
v
A.6
Elementary matrices and arrays
. . . . . . . . . . . . . . . . . . . . . . 56
A.7
Arrays and Matrices: Basic information
. . . . . . . . . . . . . . . . . 56
A.8
Arrays and Matrices: operations and manipulation
. . . . . . . . . . 56
A.9
Arrays and Matrices: matrix analysis and linear equations

سنة النشر : 2005م / 1426هـ .
عدد مرات التحميل : 60923 مرّة / مرات.
تم اضافته في : الثلاثاء , 12 يناير 2016م.
حجم الكتاب عند التحميل : 319.2 كيلوبايت .

ولتسجيل ملاحظاتك ورأيك حول الكتاب يمكنك المشاركه في التعليقات من هنا:

سلسلة تمارين وحلول في ال Matlab مع الشفرة المصدرية لحل التمارين.


Contents

1
Tutorial lessons 1
1
1.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
1.2
Basic features
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
1.3
A minimum MATLAB session
. . . . . . . . . . . . . . . . . . . . . . . . . .    2
1.3.1  Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
1.3.2  Using MATLAB as a calculator . . . . . . . . . . . . . . . . . . . . .    4
1.3.3  Quitting MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
1.4
Getting started
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
1.4.1  Creating MATLAB variables . . . . . . . . . . . . . . . . . . . . . . .    5
1.4.2  Overwriting variable  . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
1.4.3  Error messages  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
1.4.4  Making corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
1.4.5  Controlling the hierarchy of operations or precedence . . . . . . . . .    6
1.4.6  Controlling the appearance of floating point number . . . . . . . . . .    8
1.4.7  Managing the workspace . . . . . . . . . . . . . . . . . . . . . . . . .    8
1.4.8  Keeping track of your work session  . . . . . . . . . . . . . . . . . . .    9
1.4.9  Entering multiple statements per line . . . . . . . . . . . . . . . . . .    9
1.4.10 Miscellaneous commands . . . . . . . . . . . . . . . . . . . . . . . . .   10
1.4.11 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
1.5
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
2
Tutorial lessons 2
12
2.1
Mathematical functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
2.1.1  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
i
2.2
Basic plotting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
2.2.1  overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
2.2.2  Creating simple plots . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
2.2.3  Adding titles, axis labels, and annotations  . . . . . . . . . . . . . . .   15
2.2.4  Multiple data sets in one plot  . . . . . . . . . . . . . . . . . . . . . .   16
2.2.5  Specifying line styles and colors . . . . . . . . . . . . . . . . . . . . .   17
2.3
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
2.4
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
2.5
Matrix generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
2.5.1  Entering a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
2.5.2  Entering a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
2.5.3  Matrix indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
2.5.4  Colon operator  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
2.5.5  Linear spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
2.5.6  Colon operator in a matrix . . . . . . . . . . . . . . . . . . . . . . . .   22
2.5.7  Creating a sub-matrix  . . . . . . . . . . . . . . . . . . . . . . . . . .   23
2.5.8  Deleting row or column . . . . . . . . . . . . . . . . . . . . . . . . . .   25
2.5.9  Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   25
2.5.10 Continuation  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
2.5.11 Transposing a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
2.5.12 Concatenating matrices . . . . . . . . . . . . . . . . . . . . . . . . . .   26
2.5.13 Matrix generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
2.5.14 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
2.6
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
3
Array operations and Linear equations
30
3.1
Array operations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
3.1.1  Matrix arithmetic operations . . . . . . . . . . . . . . . . . . . . . . .   30
3.1.2  Array arithmetic operations . . . . . . . . . . . . . . . . . . . . . . .   30
3.2  Solving linear equations  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
3.2.1  Matrix inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   33
ii
3.2.2  Matrix functions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
3.3
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
4
Introduction to programming in MATLAB
35
4.1  Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
4.2  M-File Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
4.2.1  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
4.2.2  Script side-effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   37
4.3  M-File functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
4.3.1  Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . .   38
4.3.2  Input and output arguments . . . . . . . . . . . . . . . . . . . . . . .   40
4.4  Input to a script file  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
4.5  Output commands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   41
4.6
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
5
Control flow and operators
43
5.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
5.2
Control flow
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
5.2.1  The
‘‘if...end’’
structure . . . . . . . . . . . . . . . . . . . . . . .   43
5.2.2  Relational and logical operators . . . . . . . . . . . . . . . . . . . . .   45
5.2.3  The
‘‘for...end’’
loop . . . . . . . . . . . . . . . . . . . . . . . . .   45
5.2.4  The
‘‘while...end’’
loop  . . . . . . . . . . . . . . . . . . . . . . .   46
5.2.5  Other flow structures . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
5.2.6  Operator precedence  . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
5.3
Saving output to a file
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
5.4
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   48
6
Debugging M-files
49
6.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
6.2
Debugging process
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
6.2.1  Preparing for debugging  . . . . . . . . . . . . . . . . . . . . . . . . .   50
6.2.2  Setting breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . .   50
iii
6.2.3  Running with breakpoints . . . . . . . . . . . . . . . . . . . . . . . .   50
6.2.4  Examining values . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
6.2.5  Correcting and ending debugging  . . . . . . . . . . . . . . . . . . . .   51
6.2.6  Ending debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
6.2.7  Correcting an M-file  . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
A
Summary of commands
53
B
Release notes for Release 14 with Service Pack 2
58
B.1
Summary of changes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
B.2
Other changes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
B.3
Further details
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
C
Main characteristics of MATLAB
62
C.1
History
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
C.2
Strengths
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
C.3
Weaknesses
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
C.4
Competition
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
iv
List of Tables
1.1  Basic arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
1.2  Hierarchy of arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . .    7
2.1  Elementary functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
2.2  Predefined constant values . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
2.3  Attributes for
plot
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
2.4  Elementary matrices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
2.5  Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
3.1  Array operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
3.2  Summary of matrix and array operations . . . . . . . . . . . . . . . . . . . .   32
3.3  Matrix functions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
4.1  Anatomy of a M-File function . . . . . . . . . . . . . . . . . . . . . . . . . .   38
4.2  Difference between scripts and functions  . . . . . . . . . . . . . . . . . . . .   39
4.3  Example of input and output arguments  . . . . . . . . . . . . . . . . . . . .   40
4.4
disp
and
fprintf
commands  . . . . . . . . . . . . . . . . . . . . . . . . . .   41
5.1  Relational and logical operators . . . . . . . . . . . . . . . . . . . . . . . . .   45
5.2  Operator precedence  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
A.1
Arithmetic operators and special characters
. . . . . . . . . . . . . . .   53
A.2
Array operators
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   54
A.3
Relational and logical operators
. . . . . . . . . . . . . . . . . . . . . .   54
A.4
Managing workspace and file commands
. . . . . . . . . . . . . . . . .   55
A.5
Predefined variables and math constants
. . . . . . . . . . . . . . . . .   55
v
A.6
Elementary matrices and arrays
. . . . . . . . . . . . . . . . . . . . . .   56
A.7
Arrays and Matrices: Basic information
. . . . . . . . . . . . . . . . .   56
A.8
Arrays and Matrices: operations and manipulation
. . . . . . . . . .   56
A.9
Arrays and Matrices: matrix analysis and linear equations

سلسلة تمارين وحلول في ال Matlab
اسئلة امتحان ماتلاب
اسئلة ماتلاب pdf
جميع اوامر الماتلاب
امثلة على الماتلاب
تطبيقات الماتلاب
تمارين ماتلاب pdf
نماذج امتحانات ماتلاب
matlab examples pdf

تحميل مباشر بدون روابط كتاب سلسلة تمارين وحلول في الpdf Matlab 
قراءة وتصفح أولاين كتاب سلسلة تمارين وحلول في الpdf Matlab 

      

    

      

 



نوع الكتاب : pdf.
اذا اعجبك الكتاب فضلاً اضغط على أعجبني
و يمكنك تحميله من هنا:

تحميل سلسلة تمارين وحلول في ال Matlab



كتب اخرى في كتب علم الرياضيات

الوافي في الرياضيات PDF

قراءة و تحميل كتاب الوافي في الرياضيات PDF مجانا

التراكيب المنفصلة 5 Discrete Structures PDF

قراءة و تحميل كتاب التراكيب المنفصلة 5 Discrete Structures PDF مجانا

حلول تمارين في طرق حل المعادلات التفاضلية 1 PDF

قراءة و تحميل كتاب حلول تمارين في طرق حل المعادلات التفاضلية 1 PDF مجانا

مجلة رياضيات PDF

قراءة و تحميل كتاب مجلة رياضيات PDF مجانا

القواعد الاساسية في التفاضل والتكامل PDF

قراءة و تحميل كتاب القواعد الاساسية في التفاضل والتكامل PDF مجانا

الدائرة المثلثية PDF

قراءة و تحميل كتاب الدائرة المثلثية PDF مجانا

حلول فصل الثاني للثالث متوسط PDF

قراءة و تحميل كتاب حلول فصل الثاني للثالث متوسط PDF مجانا

الدوال المثلثية ودوالها العكسية PDF

قراءة و تحميل كتاب الدوال المثلثية ودوالها العكسية PDF مجانا

المزيد من المعاجم والقواميس في اللغة العربية في مكتبة المعاجم والقواميس في اللغة العربية , المزيد من النحو في مكتبة النحو , المزيد من كتب علمية في مكتبة كتب علمية , المزيد من كتب الجغرافيا والرحلات في مكتبة كتب الجغرافيا والرحلات , المزيد من كتب علم الفيزياء في مكتبة كتب علم الفيزياء , المزيد من علم نفس واجتماع في مكتبة علم نفس واجتماع , المزيد من رسائل ماجستير و دكتوراه فى الارشاد و علم النفس في مكتبة رسائل ماجستير و دكتوراه فى الارشاد و علم النفس , المزيد من كتب علم الرياضيات في مكتبة كتب علم الرياضيات , المزيد من كتب علم الزراعة في مكتبة كتب علم الزراعة
عرض كل الكتب العلمية ..
اقرأ المزيد في مكتبة كتب إسلامية , اقرأ المزيد في مكتبة كتب تقنية المعلومات , اقرأ المزيد في مكتبة المناهج التعليمية والكتب الدراسية , اقرأ المزيد في مكتبة القصص والروايات والمجلّات , اقرأ المزيد في مكتبة كتب الهندسة والتكنولوجيا , اقرأ المزيد في مكتبة الكتب والموسوعات العامة , اقرأ المزيد في مكتبة كتب تعلم اللغات , اقرأ المزيد في مكتبة كتب التنمية البشرية , اقرأ المزيد في مكتبة الكتب التعليمية , اقرأ المزيد في مكتبة كتب التاريخ , اقرأ المزيد في مكتبة كتب الأطفال قصص ومجلات , اقرأ المزيد في مكتبة كتب الطب , اقرأ المزيد في مكتبة الكتب العلمية , اقرأ المزيد في مكتبة كتب علوم سياسية وقانونية , اقرأ المزيد في مكتبة كتب الأدب , اقرأ المزيد في مكتبة كتب الروايات الأجنبية والعالمية , اقرأ المزيد في مكتبة كتب اللياقة البدنية والصحة العامة , اقرأ المزيد في مكتبة كتب الأسرة والتربية الطبخ والديكور , اقرأ المزيد في مكتبة الكتب الغير مصنّفة , اقرأ المزيد في مكتبة كتب المعاجم واللغات , اقرأ المزيد في مكتبة كتب علوم عسكرية و قانون دولي
جميع مكتبات الكتب ..