Download presentation
Presentation is loading. Please wait.
1
(Mohammed Sami) Ashhab
MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008 Summer 2008 University of Jordan
2
What is MATLAB The name MATLAB stands for Matrix Laboratory.
MATLAB is a matrix-based software system designed to assist in scientific, engineering and business problem solving. In this prsentation we will give you the opportunity to get accustomed with the use of MATLAB in addition to its applications and power. Information about the software can be found at the MathWorks web site . Summer 2008 University of Jordan
3
What is MATLAB Summer 2008 University of Jordan
4
What is MATLAB Summer 2008 University of Jordan
5
MATLAB Applications Engineering Science Business Summer 2008
University of Jordan
6
MATLAB Course Contents
1. Introduction 2. Vectors and Matrices 3. 2D plots 4. 3D plots 5. Scripts(m-files) 6. If statements 7. Loops 8. Functions (subroutines) 9. Experimental data analysis 10. Solution of linear differential equations 11. Solution of nonlinear differential equations 12. Handling files 13. Simulink Summer 2008 University of Jordan
7
1. Introduction Starting Matlab Summer 2008 University of Jordan
8
1. Introduction Assignment a = 2 Arithmetic Operations a = b + c
Special Symbols : Predefined Variables pi Built-in Functions abs Complex Numbers i Useful Matlab Commands who Summer 2008 University of Jordan
9
2. Vectors and Matrices Vectors and Matrices are the backbone
For MATLAB Matrix Definition Arithmetic Operations Matrix Array Operations Vectors and Colon Notation Special Matrices Block Matrices Summer 2008 University of Jordan
10
Matrix Applications Use of Built-in Functions Statistics
Polynomial Roots Solving n Equations By n Unknowns Summer 2008 University of Jordan
11
3. 2D Plots Once you master Matlab basics, vectors and matrices, It becomes simple process to generate 2-dimensional plots with MATLAB. It is possible to control the appearance of the plots and use them in other documents such as Microsoft word. Some of the plotting features are: - Curve color and style control - Axis labeling - Title Addition Text Addition - Grid, axis and legend features Summer 2008 University of Jordan
12
3. 2D Plots Basic Function Plot Multiple Curves Customizing Plots
Color and Style Grid and Axis Summer 2008 University of Jordan
13
3. 2D Plots Summer 2008 University of Jordan
14
4. 3D Plots Matlab enables you to display
three dimensional information. Surface and contour plots are possible. One dimensional curves in the three dimensional space can be generated. Deep knowledge of matrix use is needed to setup data for the plot. Summer 2008 University of Jordan
15
4. 3D Plots Summer 2008 University of Jordan
16
Subplots Summer 2008 University of Jordan
17
Subplots Summer 2008 University of Jordan
18
5. Scripts (M-file) Matlab commands can be programmed and saved in a file like in C and Java. Creating an M-file Saving Running Naming Summer 2008 University of Jordan
19
6. Logical Satements The logical statements are very important in programming Matlab. We will cover all the aspects that the user needs for logical statements such as syntax, if-statements and logical operators. Summer 2008 University of Jordan
20
7. Loops The loops are very important in programming Matlab.
We will cover all the aspects that the user needs for loops such as syntax for and while loops and break statement. Summer 2008 University of Jordan
21
8. Functions (Subroutines)
Matlab represents standalone functions in individual programs. The user can program his own functions and add them to the Matlab library. The user can use his subroutines anytime in the future once he/she has the stored in the Matlab libraries. Subroutines are essential for methods that require the solution of a function such as root finding and differential equations. Summer 2008 University of Jordan
22
9. Solution of Linear Differential Eqs
Differential equations appear in most of the scientific, engineering and business applications. Matlab is a very powerful tool for the solution of linear differential equations. A Matlab user will solve the linear differential equations efficiently when he/she understands how to convert these equations into a matrix form. In the Matlab training course we will cover the basics of linear differential equations first and then Matlab will utilized to solve all types of linear differential equations. Summer 2008 University of Jordan
23
9. Solution of Linear Differential Eqs
Summer 2008 University of Jordan
24
10. Solution of Nonlinear Differential Eqs
Nonlinear differential equations are very hard to solve analytically and therefore a computer program or software is needed. Most of the differential equations that are encountered in practical applications are nonlinear. Matlab is one of the best available softwares that can solve nonlinear differential equations efficiently and fast. Summer 2008 University of Jordan
25
11. Handling Files Matlab is able to extract data from files in formats such as excel, text, ascii and dat. Matlab generated data in Matlab is stored in the .mat (Matlab) format. Matlab allows the user to store the data in formats such as In summary, Matlab can exchange data in different formats and and thus eliminating the need to entering the data by hand when it comes from other various sources. Summer 2008 University of Jordan
26
12. Simulink Simulink is a nice and powerful tool that
represents a system as a block diagram. Each block represents a component of the system. These components are interconnected to form the block diagram. Block Diagrams are solved with Simulink. People usually prefer using Simulink over Matlab programming because it is easier to monitor and understand the system. Summer 2008 University of Jordan
27
12. Simulink Summer 2008 University of Jordan
28
12. Simulink Summer 2008 University of Jordan
29
12. Simulink Summer 2008 University of Jordan
30
Simulink Matlab Interaction
Summer 2008 University of Jordan
31
Matlab Course Projects
Electromagnetic Levitation Spring-Mass-Damper Stock Market Summer 2008 University of Jordan
32
Electromagnetic Levitation
Summer 2008 University of Jordan
33
Spring-Mass-Damper Summer 2008 University of Jordan
34
Stock Market Summer 2008 University of Jordan
35
Stock Market Summer 2008 University of Jordan
36
MATLAB Thank You Summer 2008 University of Jordan
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.