# Mathlab Fun Damantal

Topics: Matrix, Transpose, Conjugate transpose Pages: 9 (1039 words) Published: January 21, 2013
MATLAB 7.11
FUNDAMENTALS

WHAT IS MATLAB?
• User Interface & Desktop Development Environment Technical Computing Language Data Analysis & Visualization Algorithm Development & Implementing Application

• • •

CIVE 3076

MATLAB Fundamentals

2

CIVE 3076

MATLAB Fundamentals

3

ACCESSING DATA
• File formats
.mat, .xls, .xlsx, .txt .fig

.htm, xml

• Programming Languages
C/C++
Java FORTRAN .NET
CIVE 3076 MATLAB Fundamentals 4

ANALYZING DATA
• Preparing – Deleting outlier data and recovering missing data – Smoothing & finding the trend – Recognizing & classifying Analysis – Applying for statistical methods & probability models – Analyzing data & finding fitted model – Image & digital signals processing – Using special techniques ( Neural Network, Wavelets, Financial Models,, ...) CIVE 3076 MATLAB Fundamentals 5

VISUALIZATION
• Quick view
–2-D, 3-D interactive graphics –Navigating & exploring data • Displaying details –Using advanced visual methods (rotate, zoom, …) –Using advanced visual techniques (map, classifying charts, …) • Adjusting –Visual adjusting for presentation and exporting CIVE 3076 MATLAB Fundamentals 6

EXPORTING RESULTS
• • • Creating script file .m – easy to reuse Creating structural reports automatically Exporting data & graphics in the standard formats & other formats in demand

CIVE 3076

MATLAB Fundamentals

7

HOW TO INSTALL MATLAB
System Requirements:
1. Any Intel processor supporting SSE2 instruction set*

2. Disk space: 3–4 GB for a typical installation
3. RAM: 1-2 Gb 4. DVD Drive 5. Windows XP Service Pack 2-3 or Windows 7 6. Microsoft Internet Explorer 7. Adobe Acrobat Reader CIVE 3076 MATLAB Fundamentals 9

HOW TO INSTALL MATLAB
Step by step to install
Step 1: Insert Matlab7.11 DVD into DVD Drive Step 2: Enter information

Step 3: Agree with Agreement Copy Right
Step 4: Select Install Type (Manual) Step 5: Select Disk drive & Folder to install MatLab

Step 6: Select Tools to install
Step 7: Confirm your selections Step 8: Wait (about 1 hour) to complete the installing Step 9: Start  All Programs  MatLab. CIVE 3076 MATLAB Fundamentals 10

MATLAB DESKTOP
1.
2. 3.

Start button
Help window Command window

4.
5. 6. 7.

Workspace window
Command History window Current Directory window Editor window

CIVE 3076

MATLAB Fundamentals

11

MATLAB HELP
How to use Help
1. Use Help window: Way 1: Start  Help  Select the topic

Way 2: Enter command doc in the Command window  Select the topic 2. Enter command help in the Command window  Select one of the linked list.

3.. Enter command help “topic name” in the Command window  Select one of the linked list. CIVE 3076 MATLAB Fundamentals 12

DATA TYPES
Type
Integers: int8(x), int(16), uint8(x), ...

Example
1362 , 217897 –1.3412e–01

Floating-point numbers: double(x), single(x) 1.234, –10.76, Complex numbers with real & imaginary parts: 3.21 – i 4.3 Infinity: inf, -inf

Not A Number: NaN
Characters and Strings

0/0, 3@
‘Love MatLab’

CIVE 3076

MATLAB Fundamentals

13

ARITHMETIC OPERATORS
Operator
+ – .* ./ .\ : .^ .’ ’ * / \ ^
CIVE 3076

Description
Addition Subtraction Multiplication Right division Left division Colon operator Power Transpose Complex conjugate transpose Matrix multiplication Matrix right division Matrix left division Matrix power MATLAB Fundamentals 14

RELATIONAL OPERATORS
Operator <
>= == ~=
CIVE 3076

Greater than
Greater than or equal to Equal to Not equal to
MATLAB Fundamentals 15

NAMING VARIABLES
• Valid name is the combination of at most 31 characters included letters, digits. • Name must be started by a letter and should be namingfull • MatLab is case-sensitive in the name (of variables, functions) • The following names are valid: NetCost, Left2Pay, x3, X3, z25c5 • The following names are not valid : Net-Cost, 2pay, %x, @sign • Avoid using MatLab predefined identifiers for names,...