Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
54 Cards in this Set
- Front
- Back
round()
|
Round towards nearest integer
|
|
fix()
|
Round towards 0
|
|
ceil()
|
Round towards infinity
|
|
floor()
|
Round towards negative infinity
|
|
nthroot(27,3)
|
Roots 27 by 3
= 3 |
|
rem(a,b)
|
remainder of a/b
|
|
mod(a,b)
|
remainder of a/b taken into account (-/+) signs
|
|
factor()
|
returns any prime factors of 15
|
|
x = input()
|
x is assigned whatever value the user inputs
|
|
~
|
not
|
|
xor()
|
returns true (1) if exactly one of the values is true and the other is false
|
|
'
|
transposes rows to columns
|
|
x = a:b:c
|
creates a vector starting with a and ending with c with increments of b
|
|
linspace()
|
linspace(start, stop, #points)
spaces points evenly between the start and end of a number |
|
ones(n)
|
creates an n by n matrix of ones
|
|
zeros(n)
|
creates an n by n matrix of zeros
|
|
eye(n)
|
creates an n by n logical matrix
|
|
rand(n)
|
n by n matrix of random numbers from 0 to 1
|
|
ceil(10*rand(n,m))
|
creates an n by m matrix of whole numbers 1-10
|
|
size(a)
|
finds the number of rows and columns of matrix a and outputs a 2x2 vector containing (rows columns)
|
|
a(n,m)
|
accesses the value in row n, column m
|
|
A([1 2 3],3)
|
in A, rows 1, 2, and 3, column 3
|
|
A(:, n)
|
the entire column n
|
|
A(n, :)
|
the entire row n
|
|
A([3 8])
|
outputs the 3rd and 8th number in column order
|
|
find(n)
|
finds the INDEX of the numbers
|
|
sum(m)
|
sums up the vector in columns
|
|
primes(n)
|
all the primes from 1-n
|
|
fliplr(n)
|
flips the matrix n left and right
|
|
flipud(n)
|
flips the matrix n up and down
|
|
sort()
|
sorts each row from least to greatest
|
|
sortrows(z,n)
|
sorts the entire column of number n in matrix z and reorganizes the rest accordingly
|
|
max(m)
max(max(m)) |
returns the maximum number in each column
returns the maximum number in the entire matrix |
|
mean(a)
|
returns the mean of each column
|
|
meshgrid()
|
takes two vectors as arguments and creates two matrices as its output that have opposing gradients
|
|
v(n)
|
returns the value of index n
|
|
v(n) = a
|
replaces the value in index n with a
|
|
interp1(x1,y1,x2)
|
estimates the y2 values based on x1 and y1, and graphs a linear function
|
|
spline(x1,y1,x2)
|
estimates y2 values based on x1 and y1, and graphs a curvy function
|
|
polyfit()
|
it takes the x and y points and makes a polynomial expression of them
coeffs = polyfit(x,y) -- x values & y values coeffs = 3 2 1 3x^2 + 2x + 1 |
|
y_fit = polyval(coeffs, x_fix)
|
produces the y values based on the polynomial coefficients and the x values (i.e. x_fit = 1:.1:10)
and use that to plot the function |
|
Z = trapz(x,y)
x = a:n:b y = x^2 |
finds the integral of the function y from a to b
|
|
quad(y,a,b)
|
integrates y from a to b
|
|
strcmp()
|
compares 2 strings, case sensitive
|
|
strcmpi()
|
compares 2 strings, case Insensitive
|
|
int2str()
|
converts integer to string
|
|
num2str()
|
converts numbers to string including decimals
|
|
regexp()
|
matches a pattern, case sensitive
|
|
regexpi()
|
matches a pattern, case insensitive
|
|
regexprep()
|
replaces a pattern with something else
|
|
'match'
|
outputs the text of each match
|
|
*
|
matches zero or more occurrences
|
|
+
|
matches one or more occurrences
|
|
regexprep(y,'den(\w*)','peter$1')
|
substitutes den with peter
|