Term
|
Definition
linspace(first #,last #,# of #'s total) |
|
|
Term
|
Definition
x= 3 3 3 y= 1 1 1
x./y= 3 3 3 x.\y= .3 .3 .3 (rounded) |
|
|
Term
|
Definition
Matlab error
This is different from 5*a+b |
|
|
Term
x=[a,b,c] y=[g;e;f] <--notice column vector
x*y=? |
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
function (something) = anotherthing(a,b) something=a*b
anotherthing(2,4)=8 |
|
|
Term
|
Definition
adds all columns first
sum(sum(a)) will add all numbers up |
|
|
Term
|
Definition
plot(X,Y) 'g'=green 'gx' marks points with green x's and takes away connecting lines |
|
|
Term
|
Definition
|
|
Term
|
Definition
relational operators, these will give you true false results 1=true 0=false |
|
|
Term
|
Definition
repmat(number/numbers,M,N)
MxN matrix |
|
|
Term
|
Definition
ones(M,N) MxN matrix of ones ones(N) NxN |
|
|
Term
|
Definition
A=[1 2 3] %1x3 A'=[1;2;3] %3x1 |
|
|
Term
|
Definition
|
|
Term
|
Definition
polyval([1,2,3],x)=
x^2+2x+3 |
|
|
Term
designating certain parts of matrices |
|
Definition
|
|
Term
|
Definition
global X x=10
x= will be 10 |
|
|
Term
|
Definition
fplot(@func3(x),[0,10])
0 to 10 is the interval |
|
|
Term
|
Definition
used to approximate integrals
quadl is more accurate |
|
|
Term
|
Definition
trapz(t,a) t and a are vectors (number strings) integral of a with respect to t |
|
|
Term
|
Definition
[T,Y] = ode45(@func,[0,100],[0;.005])
T=Column vector time poins Y=solution points 0 to 100 is the interval and 0 and .005 are some initial points pertaining to the function |
|
|
Term
|
Definition
fzero finds roots nearest to a guess, x IF AND ONLY IF THE FUNCTION IS CONTINUOUS
fzero('sin',x)
x=guess 'sin' just an example of a function |
|
|
Term
|
Definition
3D graph of Z surface height over x and y |
|
|
Term
|
Definition
meshgrid(x,y)
creates ordered pairs of two string of numbers x and y |
|
|
Term
|
Definition
a is the vector starting the 2nd row of matrix be and going to the end. |
|
|
Term
|
Definition
eye(2)= 1 0 0 1 identity matrix |
|
|
Term
|
Definition
|
|
Term
|
Definition
[5 2]
starting#: count by: until # |
|
|
Term
v= [1 2 3] v>=2 ? v(v>=2) ? |
|
Definition
v>=2 = [0 1 1]
v(v>=2) = [2 3] |
|
|
Term
|
Definition
|
|
Term
x=[1 2 3 4 5]
x(end:-2:end-4) this is the same as x(end:-2:1) |
|
Definition
|
|
Term
|
Definition
rand(m,n)
MxN matrix of random number up to 1 |
|
|
Term
|
Definition
|
|
Term
|
Definition
find roots of x^3+2x^2
roots([1 2 0 0]) |
|
|