1/33
A collection of vocabulary flashcards based on key functions and definitions used in CS 1371.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
round(num, N)
Rounds num to N decimal places.
floor(num)
Rounds num down to the closest integer.
ceil(num)
Rounds num up to the closest integer.
mod(x, a)
Returns the remainder after x is divided by a.
cos(th) and sin(th)
Returns the cosine or sine of the angle th in radians.
cosd(th) and sind(th)
Returns the cosine or sine of the angle th in degrees.
sum(arr, dim)
Returns the sum of values in arr across dimension dim.
prod(arr, dim)
Returns the product of values in arr across dimension dim.
mean(arr, dim)
Returns the average of values in arr across dimension dim.
median(arr, dim)
Returns the median of values in arr across dimension dim.
abs(num)
Returns the absolute value of num.
diff(vec)
Returns difference between consecutive elements in vec.
[a, i] = max(vec)
Returns the value a and index i of the maximum value in vec.
[s, i] = sort(vec, order)
Sorts vec by order, returning sorted vector s and indices i.
length(vec)
Returns longest dimension of vec.
size(arr)
Returns the number of rows, columns, and layers in arr.
zeros(r, c) and ones(r, c)
Creates double array of zeros or ones of dimensions (r, c).
true(r, c) and false(r, c)
Creates logical array of trues or falses of dimensions (r, c).
lower(str)
Lowercases all alphabetic characters in str.
upper(str)
Uppercases all alphabetic characters in str.
class(var)
Returns the data type of var as a string.
isempty(arr)
Returns true if any dimension of arr is 0.
ischar(x)
Returns true if input x is of string data type.
islogical(x)
Returns true if input x is of logical data type.
iscell(x)
Returns true if input x is of cell array type.
isstruct(x)
Returns true if input x is of structure type.
isnumeric(x)
Returns true if input x is of numeric data type.
cell(r, c)
Creates a cell array of empty cells with dimensions r by c.
fopen(fn, permission)
Opens a file with a specified permission.
fprintf(fh, line)
Prints a line to the text file specified by fh.
plot(x1, y1, style1, …)
Creates plot of x and y data according to specified style.
legend(label1, …, labeln, 'Location', loc)
Creates a legend for the plot in the specified location.
linspace(start, stop, N)
Creates a vector of N linearly-spaced numbers from start to stop.
rgb2gray(img)
Converts img to a single-layer grayscale image.