final exam studying Flashcards
(118 cards)
linspace
generates row vector of n-points (default is 100) between and including a & b
linspace(a, b, n)
transpose (special case)
.’ conjugates complex numbers
to conduct operations on vectors/matrices, the dimensions must be _______
the same
random function
generates random numbers based on input specifications
rand(3)
3 by 3 matrix with random numbers 0-1
rand(10, 1, 5)
10 by 10 of random numbers between 1-5
find function
locates non-zero elements and outputs indices
min/max functions
returns smallest/largest in each vector (for matrices, it’s for each column)
[M, I] = min(x)
what are M and I
M is the values, I is the indices
sortrows function
sorts matrix by specified column from smallest to largest (add ‘descend’ to flip)
symmetric error-bar function
errorbar(x, y, e)
e is the error
asymmetric error-bar function
errorbar(x, y, d, u)
histograms –> d is low error and u is high error
line graph–> d is negative error and u is positive
meshgrid function
creates 2d matrix for input vectors, (repeats the vector over and over)
[ X, Y] = meshgrid(x,y)
how to generate Z with results of meshgrid function?
remember [X, Y] = meshgrid(x,y)
Z = sin(X) .* cos(Y)
linear interpolation
estimating values at certain points based on existing ones
interp1(x,y, new_x)
cubic spline interpolation
smooths curve and minimizes errors (fitting interpolation)
least squares fitting
line of best fit for data based on the slope and intersection (goal is to minimize R)
linear regression
finds the linear function that best fits the data
polyfit function
returns coefficients of degree n that’s the best fit with least squares
polyfit(x, y, n)
polyval function
evaluates polynomial at each point of x
polyval(p, x)
diff function
calculates difference between consecutive elements
resistance and current (I = )
I = V/R
systems (in bioengineering)
groups of things that affect signal of interest
model (in bioengineering)
symbolic representations of process, system, or data collection