Homework 1
16-311 Introduction to Robotics
Fall-05. Prof. Howie
Choset
Due in class Tuesday, September 6th
Please answer the following questions. Create a webpage containing your text answers (and any pictures) in HTML
format. When handing in your assignment, email Steven Shamlian (sshamlia+hw1@andrew.cmu.edu)
the URL address and
hand in a hard copy of your website in class.
Do NOT hand in printouts of your C code. List the afs path (e.g. ~choset/gr04/matvec)
of your executeable (please compile the program)
and make sure the TA's can access it (putting it in your public directory is one option)
Feel free to use this sample code written by
Cuban and commented by Howie (though you may do this your own way if you like).
Take a look at some clarifications, sample input and a sample program here.
NEW!! 9/2/2004 [-Compiling in Clusters-]
- Program: Matrix-Vector Evaluator
Write a program that
runs under unix to perform 3x1 vector and 3x3 matrix arithmetic. The program
should take from standard input one line at a time a sequence of
expressions, described below. A line with nothing on it should do nothing. The
command END should terminate the program. Hand in the afs path of the compiled
and source code. The following are the commands to be defined:
- Vector and Matrix instantiation.
For vectors, a lower case letter
followed by an ``='' sign, and then followed by three numbers sets the value
for the vector. For matrices, an upper case letter, followed by an ``=''
sign, and then followed by nine numbers sets the value for a matrix. To make
things easier, assume there could only be 26 vectors and 26 matrices. Hint:
there is a nice relationship between chars and ints in C.
- Printing.
A vector or matrix on a line by itself followed by return
should print the vector or matrix in their appropriate forms.
- Addition.
c = a + b ------ store the sum of a and b into c.
C =
A + B ------ store the sum of A and B into C.
- Multiplication
c = a.b ----- should compute the dot product of a and
b and store in it in the first component of c
c = a*b ----- store the
cross product of a and b in c
C = A*B ----- perform matrix
multiplication of A and B
v = M*x ----- perform the matrix-vector
multiplication.
- Find a picture of a robot, not from Carnegie Mellon, on the web and
display it. Comment on its application in terms of sense, plan, and
act. As a student of Carnegie Mellon you get free webspace, click here to find out how to use it.