You are on page 1of 6

Cody Anderson

ECE105

ECE105 Follow-Along 5
This worksheet is not graded. However, you should use it as follows:
1. Print it out
2. Watch the lecture videos and answer the questions here
3. Bring this to the quiz (open-notes!)
4. Save this like it was your set of notes for the class

Video 5.1: Basic 2d Plots


1. Which two functions allow you to plot a symbolic equation?

2. Fill in the blank: The plot function plots _______________ data points

3. The x data to be plotted is a 1x15 vector. What must be the size of the y data to plot with
this?

4. What can we do before the plot command to make the curves appear smoother?

5. What does a plot without labels mean? Provide two answers.

6. Write a command that will put the text ‘Age [yrs]’ as a label for the y-axis, in boldfaced size
20 font

7. You are asked to plot Moisture vs. Soil Depth. Which one should be the dependent variable?

1
Cody Anderson
ECE105

Video 5.2: Modifying Plot Appearance


1. Does a solid line on a plot imply continuous or discrete data?

2. Name the three curve features that can be adjusted with the shorthand modifiers

3. Write a command that would plot y vs. x as a magenta dotted line with square markers

4. Write a command that would plot y vs. x as magenta square markers with no line

5. Write a command that would plot y vs. x using a dashed black line and right-pointing
triangles for markers. Make the line width equal to 2. Use an RGB triplet to make the
marker face color purple (100% red mixed with 100% blue).

2
Cody Anderson
ECE105

Video 5.3: Multiple Plots


1. Fill in the blank: when creating data to plot, the independent variable is often created as an
__________________ vector.

2. Write a single command that would plot Height vs. Age and Weight vs. Age on the same
figure

3. Write three commands (one of which is hold on) that together would plot Height vs. Age
and Weight vs. Age on the same figure

4. After making the figure in question 3, write a command that would place a well-named
legend in the lower-right corner of the figure

5. Write a command with subplot that would be accessing the bottom half of a figure window
that has slots for two plots (one on top and one on bottom)

3
Cody Anderson
ECE105

Video 5.4: Adjusting Axes


1. Write a command that would adjust the x-axis to span from 18 to 24

2. Write a single command that would adjust the x-axis to span from 5 to 9 and the y-axis to
span from 2 to 8

3. Fill in the blank: On a linear axis, the tick marks are spaced by ________________________
a consistent amount between each

4. Fill in the blank: On a logarithmic axis, the tick marks are spaced by ____________________
a consistent amount between each

5. Provide two reasons for using a logarithmic axis

6. Write a command that would plot Qty vs. Time with a logarithmic y-axis and a linear x-axis

4
Cody Anderson
ECE105

Video 5.5: Special 2d Plots


1. If coordinates are given as an angle and a distance from the origin, what coordinate system
should be used?

2. Write a command that would plot Food vs. Age as a horizontal bar chart

3. A pie chart is made with 5 total categories. Write the “explode” vector needed to make only
the second category pop out of the main pie chart.

4. What type of plot shows the frequency of events that fall into specific bins?

5. Fill in the blanks: Analyzing which plot types are useful for certain situations will make you a
better _________________________ and a better ______________________________

5
Cody Anderson
ECE105

Video 5.6: 3d Plots


1. What function is used to create 3-dimensional line plots?

2. List the three types of 3d surface plots

3. How many independent variables are used in surface plots?

4. Fill in the blank: A surface plot is made discretely, so we need to pass in a set of ordered
_____________

5. Which function creates matrices that allow every combination of values within two input
vectors?

6. In the command z = (x_grid.^2) .* y_grid, why are the periods necessary?

You might also like