360 likes | 378 Views
MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008. What is MATLAB The name MATLAB stands for Mat rix Lab oratory. MATLAB is a matrix-based software system designed to assist in scientific, engineering and business problem solving.
E N D
MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008 University of Jordan
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 http://www.mathworks.com . University of Jordan
What is MATLAB University of Jordan
What is MATLAB University of Jordan
MATLAB Applications Engineering Science Business University of Jordan
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 University of Jordan
1. Introduction Starting Matlab University of Jordan
1. Introduction Assignment a = 2 Arithmetic Operations a = b + c Special Symbols : Predefined Variables pi Built-in Functions abs Complex Numbers 3+4i Useful Matlab Commands who University of Jordan
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 University of Jordan
Matrix Applications Use of Built-in Functions Statistics Polynomial Roots Solving n Equations By n Unknowns University of Jordan
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 University of Jordan
3. 2D Plots Basic Function Plot Multiple Curves Customizing Plots Color and Style Grid and Axis University of Jordan
3. 2D Plots University of Jordan
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. University of Jordan
4. 3D Plots University of Jordan
Subplots University of Jordan
Subplots University of Jordan
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 University of Jordan
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. University of Jordan
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. University of Jordan
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. University of Jordan
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. University of Jordan
9. Solution of Linear Differential Eqs University of Jordan
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. University of Jordan
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 excel, text, ascii and dat. 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. University of Jordan
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. University of Jordan
12. Simulink University of Jordan
12. Simulink University of Jordan
12. Simulink University of Jordan
Simulink Matlab Interaction University of Jordan
Matlab Course Projects Electromagnetic Levitation Spring-Mass-Damper Stock Market University of Jordan
Electromagnetic Levitation University of Jordan
Spring-Mass-Damper University of Jordan
Stock Market University of Jordan
Stock Market University of Jordan
MATLAB Thank You University of Jordan