Plotting

Introduction

1. It is a very important and powerful feature in MATLAB.
2. Plot functions: some useful functions for creating plots are:

Type “help graphics” in command window for more information.

Plot Functions

Here are some examples to use the different plot functions.
Example 1:

Example 2:

Plot Multiple Data Set

Plotting multiple data set in one graph.

Hold

Use of “hold” command.

Subplot

Displaying multiple plots in one figure- “subplot”
Syntax: subplot (m,n,p)

Customizing a Plot

Various functions can be used to customize the plot, such as, title, xlabel, ylabel, etc.

1. Line styles:

2. Colors:

3. Marker specifiers:

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s