emadeldeen

Emadeldeen Abdallah

Teadching-Assistant -

Faculty of Computers and Information

Address: Sohag

60

Like

MATLAB

2018-06-12 00:57:57 |

MATLAB Product Description . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Desktop Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Matrices and Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Array Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Workspace Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Text and Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Calling Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
2-D and 3-D Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Line Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
3-D Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
Subplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
Programming and Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
Sample Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
Loops and Conditional Statements . . . . . . . . . . . . . . . . . . . . 1-30
Script Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32

Help and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33

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


2018-06-12 01:48:10 | MATLAB
Task 01
Print all numbers from 1 to 35 except divided by 7 and 5... Read more

2018-06-12 01:51:04 | MATLAB
Task 02 -  	3-D Plots
Three-dimensional plots typically display a surface defined by a function in two variables, z = f(x,y) . To evaluate z, first create a set of (x,y) points over the domain of the function using meshgrid. >> [X,Y] = meshgrid(-2:.2:2); >> Z = X .* exp(-X.^2 - Y.^2); Then, create a surface plot. >>... Read more

Lecture 01 Introduction to (MATLAB Basic

2018-06-12 01:14:47 MATLAB
MATLAB BASICS Create a variable named a by typing this statement at the command line >> a = 1 a = 1 Hide Result by adding (;) at end of statement. >> a = 1; When y Read more

Lecture 02 Introduction to (Matrices and

2018-06-12 01:20:06 MATLAB
Date: 10/03/2018 10:00 AM Day: Saturday Section Num.: (02) MATRICES AND ARRAYS * MATLAB is an abbreviation for "matrix laboratory." While other programming languages Read more