0% found this document useful (0 votes)
15 views12 pages

Week 13 - Matlab

The document provides an introduction to Matlab, a numerical computing environment and programming language created by The MathWorks, highlighting its capabilities such as matrix manipulation, plotting, and algorithm implementation. It emphasizes the advantages of using Matlab, including its high-level coding, rich data types, and high-quality graphics. The document also showcases various types of graphics that can be created in Matlab, such as line plots, stem plots, mesh plots, surface plots, and contour plots.

Uploaded by

Yohan Lim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

Week 13 - Matlab

The document provides an introduction to Matlab, a numerical computing environment and programming language created by The MathWorks, highlighting its capabilities such as matrix manipulation, plotting, and algorithm implementation. It emphasizes the advantages of using Matlab, including its high-level coding, rich data types, and high-quality graphics. The document also showcases various types of graphics that can be created in Matlab, such as line plots, stem plots, mesh plots, surface plots, and contour plots.

Uploaded by

Yohan Lim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

1

Introduction to Matlab
Dr Jaylina Rana
Week 13

CIVE1007Y ‐ Professional Communication


2

• What is Matlab?

• Why use Matlab?

• What is possible in Matlab? Graphic examples

• How Matlab works?


3

What is Matlab?
• Numerical computing environment & programming
language.

• Created by The MathWorks, MATLAB allows easy:

▫ Matrix manipulation,
▫ Plotting of functions and data,
▫ Implementation of algorithms,
▫ Creation of user interfaces, and
▫ Interfacing with programs in other languages.
4

Why use Matlab?

• Allows quick and easy coding in a very high‐level language.


• Rich data types: Complex number, Three dimensional
matrix, structure, cell array, etc
• Lots of users: economists, mathematicians, engineers, …
• High‐quality graphics and visualization facilities are
available.
• MATLAB M‐files are completely portable across a wide
range of platforms.
5

Workspace: consists of the variables you


create during a MATLAB session;

Current Directory browser: shows you where


you are.

Launch Pad: displays all the tools and applications


associated with MATLAB
6

What kind of graphics is possible in Matlab?

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-3 -2 -1 0 1 2 3

x = -2.9:0.2:2.9;
bar(x,exp(-x.*x));
7

What kind of graphics is possible in Matlab?


1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Line plot:
x=0:0.05:5;y=sin(x.^2);plot(x,y);
8

What kind of graphics is possible in Matlab?

0.35

0.3

0.25

0.2

0.15

0.1

0.05

-0.05

-0.1

-0.15
0 0.5 1 1.5 2 2.5 3 3.5 4

Stem plot:
x = 0:0.1:4;, y = sin(x.^2).*exp(-x);
stem(x,y)
9

What kind of graphics is possible in Matlab?

10

-5

-10
30
25
20
20
15
10 10
5
0 0

Mesh plot: z=peaks(25); mesh(z);


10

What kind of graphics is possible in Matlab?

10

-5

-10
30
25
20
20
15
10 10
5
0 0

Surface plot:
z=peaks(25);, surf(z);, colormap(jet);
11

What kind of graphics is possible in Matlab?

25

20

15

10

5 10 15 20 25

Contour plot: z=peaks(25); contour(z,16);


12

What kind of graphics is possible in Matlab?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy