Difference w C++
Plotting
Common Functions
Working with Data
Prof Jay
100

This element of syntax is required at the end of every C++ command - but not in Matlab.

What is a semicolon?

100

This plot type creates a plot with markers but no connecting lines by default.

What is scatter?

100

This function calculates the average of each column in a matrix.

What is average?

100

This lets you multiply each element of a matrix by the corresponding element of a second matrix.

What is .* ?

100

This is Prof. Jay's favorite NHL hockey team.

What are the Boston Bruins?

200

This is not required when declaring a variable in Matlab, but it is required in C++.

What is the data/variable type?

200

This function/keyword pair closes all figures that are currently open.

What is close all?

200

This is something you can do when you need help using Matlab.

What is typing help into the command window?

200

This tools lets you read data into Matlab from common file types like .xlsx or .csv (among others).

What is Import Data (or data import tool)?

200

This is Prof Jay's beverage of choice every morning, no matter the weather.

What is cold brew (or iced coffee)?

300

This coding structure is often used in C++ when you want something done to every element of an array, but is often unnecessary when doing the same thing in Matlab.

What is a for loop?

300

This command enables the ability to plot more than one set of data on the same figure.

What is hold (or hold on)?

300

This function returns the number of elements in a 1D array.

What is length()?

300

This function calculates the best fit polynomial to a set of data.

What is polyfit?

300

This is where Prof Jay is going for Spring Break.

What is Milan?

400

This section of the Matlab IDE lets you see, in real time, what variables currently exist and what their current sizes and values are.

What is the workspace?

400

This function helps you manipulate a pair of 1D arrays so that you can more easily create a surface plot.

What is meshgrid?

400

This function returns the sin of an angle in degrees.

What is sind?

400

This function helps you create an array of a desired length with specific initial and final values.

What is linspace?

400

This is Prof Jay's favorite color.

What is purple?

500

This file type, while not commonly used in industry, lets you mix executable code, text, and images in Matlab.

What are Live Scripts?

500

This is the sytnax for plotting t on the horizontal axis, v on the vertical axis, with a magenta dashed line.

What is plot(t, v, 'm:')?

500

This function prints data and messages out to the screen with specific desired formatting.

What is fprintf?

500

This is what Matlab inserts when it finds a non-numerical data point within a numerical array of data.

What is NaN?

500

This is the city where Prof. Jay grew up.

What is New Bedford, MA?

M
e
n
u