Recall & Review
beginner
What does the
subplot function do in MATLAB?It divides the figure window into a grid of smaller axes (panels) and selects one for plotting.
Click to reveal answer
beginner
How do you create a 2-by-3 grid of plots and select the 4th panel?
Use
subplot(2, 3, 4). This means 2 rows, 3 columns, and the 4th panel is active.Click to reveal answer
intermediate
What happens if you call
subplot multiple times with the same position?The new plot replaces the old one in that panel, clearing previous content.
Click to reveal answer
beginner
How can you add a title to each subplot panel?
After calling
subplot, use title('Your Title') to add a title to that panel.Click to reveal answer
intermediate
How to create a 2x2 subplot and plot different data in each panel?
Call
subplot(2,2,i) for i=1 to 4, then plot data in each selected panel separately.Click to reveal answer
What does
subplot(3,1,2) do?✗ Incorrect
The first two numbers define rows and columns, the third is the panel number.
If you want 4 plots in one figure arranged in 2 rows and 2 columns, which command is correct to select the last panel?
✗ Incorrect
2 rows and 2 columns means 4 panels; 4th panel is selected by subplot(2,2,4).
What happens if you plot twice on the same subplot without holding on?
✗ Incorrect
By default, new plots overwrite old plots in the same axes.
How do you add a title to a specific subplot?
✗ Incorrect
You select the subplot first, then call
title('text').Which command creates a 3x2 grid of subplots?
✗ Incorrect
The first two numbers are rows and columns: 3 rows, 2 columns.
Explain how to create multiple panels in one figure using
subplot in MATLAB.Think of dividing a window into smaller boxes and drawing in each box.
You got /3 concepts.
Describe how to add titles and labels to individual subplot panels.
Each panel is like a mini-plot with its own decorations.
You got /3 concepts.