0% found this document useful (0 votes)
33 views32 pages

BasicMDL 1 Apprec

This document introduces MATLAB and provides an overview of its features and capabilities. It discusses starting and quitting MATLAB, keyboard usage, using MATLAB as a calculator, documentation, and utility functions. Scientific problem solving in MATLAB is also introduced, including stating the problem, defining inputs and outputs, developing an algorithm, implementing and testing the solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views32 pages

BasicMDL 1 Apprec

This document introduces MATLAB and provides an overview of its features and capabilities. It discusses starting and quitting MATLAB, keyboard usage, using MATLAB as a calculator, documentation, and utility functions. Scientific problem solving in MATLAB is also introduced, including stating the problem, defining inputs and outputs, developing an algorithm, implementing and testing the solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

Introducing MATLAB

(MATLAB Appreciation)

Dominic C. Ezugworie
[email protected]
+234 (0) 703 907 1904

© 2014 Dominic C. Ezugworie


2
The Journey Begins

 MATLAB Appreciation

Scientific Problem Solving

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

 MATLAB is a high-performance language


for technical computing.
 problems and solutions are expressed in
familiar mathematical notation.
 MATLAB = MATrices LABoratory
 Features “Toolboxes” for specialised
Technology

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.

Press the up arrow key to recall a


statement you previously typed.
10
The Command History
Statements you enter in the Command Window are logged in the
Command History.

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

• Without knowing the number and the radix priori,


How do determine the number of digits in a
number?
• Given a value for x, what is the square root of:
3x2 - 5x + 57
• RSA challenge
– Find the two prime numbers multiplied to give the
number: 175,828,273
MATLAB Appreciation
 Software overview
 Starting and Quitting MATLAB
 Keyboard Usage
 Using MATLAB as a scratch pad
 Software Documentation
• MATLAB Utility Functions

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

Scientific Problem Solving

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

Scientific Problem Solving with MATLAB

31

You might also like