matlab ttutorial 1.ppt
TRANSCRIPT
![Page 1: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/1.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 1/29
MATLAB TUTORIAL
Matlab Basics
![Page 2: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/2.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 2/29
Purpose of this Section
To illustrate simple uses of the MATLAB
Technical language
To help you understand under whatcircumstances is MATLAB a better choice
than spreadsheets and high-level languages
![Page 3: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/3.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 3/29
What is MATLAB?
A high-performance language for technicalcomputing (Mathworks, 1998)
Typical uses of MATLAB
Mathematical computations
Algorithmic development
Model prototyping (prior to complex model
development)Data analysis and exploration of data(visualization)
Scientific and engineering graphics for
presentation
![Page 4: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/4.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 4/29
Why Matlab?
Because it simplifies the analysis of mathematical models
It frees you from coding in high-levellanguages (saves a lot of time - with somecomputational speed penalties)
Provides an extensible programming/visualization environment
Provides professional looking graphs
![Page 5: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/5.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 5/29
Foundation of Matlab
The name is derived from MATrix LABoratory MATLAB is a case sensitive language (a variable
named “c” is different than another one called “C”) MATLAB works with matrices everything
MATLAB understands is a matrix (from text to largecell arrays and structure arrays)
Various data types exist within MATLAB- single precision
- double precision
- integer (8 bit)
![Page 6: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/6.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 6/29
The Matlab Environment
![Page 7: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/7.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 7/29
MATLAB has the following basic windowcomponents:
Work-space
Displays all the defined variables.
Command Window
To execute commands in the MATLAB
environment Command History
Displays record of the commands used
![Page 8: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/8.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 8/29
Command Window
![Page 9: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/9.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 9/29
Command Window (Contd..)
The command window allows you to interact with
MATLAB just as if you type things in a calculator
Cut and paste operations ease the repetition of tasks Use „up-arrow‟ key to repeat commands (command
history)
![Page 10: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/10.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 10/29
Launch Pad
![Page 11: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/11.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 11/29
Launch Pad (Contd…)
The launch window allows you to quickly
select among various MATLAB components
and toolboxes
![Page 12: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/12.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 12/29
Matlab Workspace
![Page 13: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/13.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 13/29
Workspace(Contd…)
Workspace of Matlab shows all the defined
variables along with their “order”, memory
space they occupy and the class to which they belong
Above are shown a few such variables
![Page 14: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/14.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 14/29
Current Directory
![Page 15: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/15.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 15/29
Current Directory (Contd…)
Provides quick access to all files available in
your Path
Provides a brief description (when files arecommented out) of each M-file
![Page 16: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/16.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 16/29
Different Views
![Page 17: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/17.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 17/29
Different Views (Contd…)
The Matlab environment could be viewed in
various ways.
This could be accomplished by the VIEW pull-down menu as shown in the previous
slide.
![Page 18: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/18.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 18/29
Matlab Help
![Page 19: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/19.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 19/29
Matlab Help (Contd..)
Matlab Help is an extremely powerful
assistance to learn Matlab.
The Help not only contains the theoretical background but also shows the demos for
implementation
The Matlab Help could be opened by usingthe HELP pull-down menu
![Page 20: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/20.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 20/29
Matlab Help (Contd..)
![Page 21: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/21.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 21/29
Matlab Help (Contd..)
Any command description can be found by
typing the command in the search field.
As shown above the command to take squareroot (sqrt) is searched
We can also utilize the Matlab help from the
command window as shown in the next slide.
![Page 22: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/22.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 22/29
Matlab Help (Contd..)
![Page 23: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/23.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 23/29
To begin a new M-file
![Page 24: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/24.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 24/29
How the source-code looks like
![Page 25: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/25.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 25/29
The Whos Command
![Page 26: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/26.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 26/29
Scalar Calculation
![Page 27: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/27.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 27/29
Vector Calculation
![Page 28: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/28.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 28/29
Matrix Calculation
![Page 29: Matlab Ttutorial 1.ppt](https://reader031.vdocument.in/reader031/viewer/2022020717/577cd6d31a28ab9e789d59b2/html5/thumbnails/29.jpg)
7/27/2019 Matlab Ttutorial 1.ppt
http://slidepdf.com/reader/full/matlab-ttutorial-1ppt 29/29
Thank You