MATLAB Plotting Basics and Functions

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering essential MATLAB plotting commands, options, and example plot types from the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

plot()

MATLAB function for creating 2-D line graphs.

2
New cards

xlabel()

Adds a label to the x-axis of a plot.

3
New cards

ylabel()

Adds a label to the y-axis of a plot.

4
New cards

title()

Adds a title to the current axes.

5
New cards

grid on

Turns on a background grid to aid visual interpretation.

6
New cards

Line Styles

Patterns such as '-', '--', ':', and '-.' that control how lines are drawn.

7
New cards

Markers

Symbols like 'o', 's', '*', 'd' that mark individual data points on a plot.

8
New cards

hold on / hold off

Keeps current plot so additional data can be added / releases it.

9
New cards

legend()

Adds a descriptive label for each plotted data series.

10
New cards

bar()

Creates a bar chart for categorical or numerical data.

11
New cards

histogram()

Displays the distribution of data by grouping values into bins.

12
New cards

scatter()

Creates a scatter plot showing the relationship between two variables.

13
New cards

pie()

Generates a pie chart to show proportional data.

14
New cards

subplot()

Divides a figure window into a grid of sub-axes for multiple plots.

15
New cards

plot3()

Plots 3-D line data with x, y, and z coordinates.

16
New cards

meshgrid()

Generates 2-D grids for X and Y suitable for surface or mesh plots.

17
New cards

surf()

Creates a 3-D colored surface plot from X, Y, Z matrices.

18
New cards

shading interp

Interpolates colors across faces for smooth 3-D shading.

19
New cards

colorbar

Displays a color scale indicating data-to-color mapping.

20
New cards

saveas()

Saves the current figure to a file (e.g., PNG, PDF).

21
New cards

Sine Wave Example

Line plot of y = sin(x); demonstrates basic plotting and customization.

22
New cards

Bar Chart Example

Blue bars comparing categories A–D; illustrates categorical plotting.

23
New cards

Histogram Example

Magenta histogram with 20 bins of normally distributed random data.

24
New cards

Scatter Plot Example

Red filled dots sized at 100; visualizes two random 10-range variables.

25
New cards

3D Surface Plot

Plot of Z = sin(\sqrt{X^2+Y^2}) over a grid; shows shaded, colored surface.