|
MATLAB RESOURCES |
|
A Matlab tutorial from the University of New Hampshire
Quick introduction to MATLAB
Defining a Vector |
|
>> v = [3 1 1] v = 3 1 1 |
|
Defining Matrices |
|
>> A = [ 1 2 3; 3 4 5; 6 7 0] A = 1 2 3 3 4 5 6 7 0 |
|
Matrix time a vector |
|
>> A*v'
ans =
8 18 25 |
Inverse of a Matrix |
|
>> inv(A)
ans =
-2.1875 1.3125 -0.1250 1.8750 -1.1250 0.2500 -0.1875 0.3125 -0.1250 |
|
Eigenvalues |
>> eig(A)
ans =
10.4237 -0.2996 -5.1241 |
Eigenvectors |
>> [v,e] = eig(A)
v =
-0.3504 -0.7526 -0.3044 -0.6717 0.6497 -0.3788 -0.6527 -0.1071 0.8740
e =
10.4237 0 0 0 -0.2996 0 0 0 -5.1241 |
|
Determinant |
>> det(A)
ans =
16 |
|
|
Echelon Form ( ROWREDUCE) |
>> R = rref(A)
R =
1 0 0 0 1 0 0 0 1 |
rrefmovie(A) |
|
Characteristic polynomial |
>> syms lemda >> det( A -
lemda*eye(3) ) ans = 55*lemda+5*lemda^2+16-lemda^3 |
Matrix Exponential |
>> exp(A) ans = 1.0e+003 * 0.0027
0.0074 0.0201 0.0201
0.0546 0.1484 0.4034 1.0966 0.0010 |
|
Find the Laplace Transform |
syms t |
Find the Inverse |
syms s |
Direction Field |
Information about direction field can be found here |
System of Differential Equations |
Here is an example how to solve a system of differential equations. (exercises)
|