BasicMDL 1 Apprec
BasicMDL 1 Apprec
(MATLAB Appreciation)
Dominic C. Ezugworie
[email protected]
+234 (0) 703 907 1904
MATLAB Appreciation
3
MATLAB Appreciation
Software overview
• Starting and Quitting MATLAB
• Keyboard Usage
• Using MATLAB as a scratch pad
• Software Documentation
• MATLAB Utility Functions
4
Overview of MATLAB
5
Overview of MATLAB
The system comprises
Desktop Tools and Development
Environment
The MATLAB Mathematical Function Library
The MATLAB Language
Graphics
MATLAB External Interfaces
6
7
8
Desktop Overview
9
The Command Window
Use the Command Window to enter variables
and to run functions and M-file scripts.
11
The Current Directory
12
The Workspace Browser
13
MATLAB Appreciation
Software overview
Starting and Quitting MATLAB
Keyboard Usage
Using MATLAB as a scratch pad
• Software Documentation
• MATLAB Utility Functions
14
Starting and Quitting MATLAB
• Starting
– Normal as with every other software
– From the start menu
– Or double-click the desktop icon
• Quitting
– File > Exit MATLAB
– Command line >> exit
– Command line >> quit
– (don’t just click the close button!!!)
15
Keyboard Usage
• Master your Keyboard
• Familiarise with the keys
• Make friends with the symbol keys
– %, &, *, ^, ’,[ ], { }, ( ),/,+,-,=
– % And numeric keys
– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
16
Using MATLAB as a scratch pad
Somebody called MATLAB
• Quickly scratch out calculations “a glorified calculator”
What do you think?
• Can be as simple as x = 75 – 39;
• Or finding the determinant of a [2x2] matrix
• Intermediate as in finding the roots of a polynomial
e.g. roots([1, -6, -72, -27]);
• Complex as in finding the bessel function of the third
kind of the equation:
17
Using MATLAB as a scratch pad
Any idea?...try these, else KIV
19
The Help Documentation
• The MATLAB program provides extensive
documentation
– in both printable and HTML format
– Available on the internet and offline (in-built)
• Make it a good companion!
– “reading up” is no crime
• MATLAB features covered at a high level,
including many examples
20
The Help Documentation
To access the in-built documentation:
• Method 1 (using the mouse)
– Help menu -> Product Help
– Standard Toolbar -> help icon
• Method 2 (using the keyboard)
– Press F1
– Execute doc from the command line
• Method 3 (go to specific topic)
>> doc besselh
21
The Help Documentation (R2009b)
22
The Help Documentation - Blocksets
23
The Help Documentation
- Links and Targets
24
MATLAB Appreciation
Software overview
Starting and Quitting MATLAB
Keyboard Usage
Using MATLAB as a scratch pad
Software Documentation
MATLAB Utility Functions
25
MATLAB Utility Functions
• doc; helpdesk; helpwin
• pwd; cd
• format
• clc; clf; cla
• tic, ..., toc;
• who; whos; class
• clear
26
The Journey Continues
MATLAB Appreciation
27
Scientific Problem Solving
28
Scientific Problem Solving
29
Scientific Problem Solving
• State the problem
• Describe the input values (knowns) and the
required outputs (unknowns).
• Develop an algorithm to solve the problem
• Solve the problem
– create the MATLAB solution
• Test/validate the solution
30
After this Session ...
MATLAB Appreciation
Software overview
Starting and Quitting MATLAB
Keyboard Usage
Using MATLAB as a scratch pad
Software Documentation
MATLAB Utility Functions
31