MatLab Assignment 2
-- Turn in on February 1
-- Vectors, Matrices, Matrix Algebra and
MatLab Functions rref
If you have any question or problem with MatLab, please
send me an email at:
chenm or
call me at: 953-7896.
- For this project, you need to record some computation results
for your report. Read the MatLab
handout (2) to see how to save computation
results in text into a file on A Drive or C Drive under directory
mydocu~1 (my document). After you are done with computation
and recording, you may use Note Pad or a
word processor
to edit the text and write your comments
before turn it in as the project report.
- Read the MatLab
handout (2) to learn how to perform
the vector and matrix operations numerically and symbolically
in MatLab. Note that the matrices given below are typed
in a way as they are initialized in MatLab. To save time on
typing numbers in MatLab, you may do the following.
- Start the Netscape and display the content of the project on the
screen (http://macs02.citadel.edu/~chen/234.dir/mlass2.html).
- Highlight the matrix to be initialized in MatLab.
- Use Copy on the Netscape window bar to copy down
the matrix and then use Paste on the
MatLab window bar to down load (therefore initialize) the matrix.
- Let A=[-1 9 4;2 -3 -6;0 5 7] a 3x3 matrix, B=[-4 9 2;3 -5 7;8 1 -6]
a 3x3 matrix, C=[1 -2 3 2;3 1 -1 4] a 2x4 matrix and D=[a;b;c;d] a 4x1 matrix.
Use MatLab to compute the following.
- (a) 2A-3B; (b) A2; (c) AB-BA; (d) (A+AT)/2
- (a) D+D; (b) DTD; (c) DDT; (d) CD
-
Consider a communication system consisting of 6 stations. Some stations
in this system do not have direct one-way connections to some of other stations.
Assume that a station does not connect to itself directly.
Suppose we know that:
- Station 1 has an one-way connection to Station 3 and to Station 5;
- Station 2 has an one-way connection to Station 4;
- Station 3 has an one-way connection to Station 2;
- Station 4 has an one-way connection to Station 1, to Station 3 and to Station 6;
- Station 5 has an one-way connection to Station 6;
- Station 6 has an one-way connection to Station 2 and to Station 4.
(1) Let A=[aij]6x6, where aij=1
if Station i has an one-way connection to Station j, otherwise,
aij=0. Set up matrix A.
(2) Determine if Station 1 will have an one-way connection to Station 4
with help of 1 station. If so, how many channels are there?
(3) Determine if Station 1 will have an one-way connection to Station 4
with help of 2 stations. If so, how many channels are there?
(4) Determine the minimum number of stations that Station 3
needs to pass through to connect to Station 5.
(5) Determine the minimum number of stations that all stations
are allowed to pass so that each station has at least one one-way
connection to each of other 5 stations.
- Let A=[1 2 3;4 5 6;7 8 9], B=[1 2 3;4 5 6;7 8 10], b1=[1;2;3],
b2=[1;1;2], b3=[1;1;1]. For each of the systems:
(a) Ax=b1; (b) Ax=b2; (c) Bx=b3,
(1) use the MatLab function rref
as a tool to determine if it is consistent;
(2) then solve the system if it is consistent.