COMS W31016 (CVN): Homework 2
http://www.cs.columbia.edu/~pblaer/matlabcvn/hw2.html
1 of 3
4/8/2008 10:24 PM
COMS W31016 (CVN) Spring 2008
Homework 2
Worth 15% of the total grade.
For this assignment you should write a single mscript file called
hw2.m
. At the top of the file you should put
your name and CUNIX ID in a comment. There are multiple exercises in this assignment. For each exercise
you will have to write a single or series of MATLAB commands. Make sure to label your solution to each
exercises with a comment.
Exercises:
You should not suppress output on any of your commands. All variables created should persist throughout the
script (unless you are explicitly asked to clear them). That is, if you create a variable X in problem 2, I'm
referring to the same X in problem 5.
a. Display the square root of 2100 in scientific notation with 16 digit precision. Reset the format back
to its default.
b. Set s equal to the cosine of 30 degrees.
c. Compute the inverse sine of s in radians.
d. Set t equal to the result of part c converted to degrees.
e. Compute the value of e
t
1.
a. Fill a
column
vector, x, with 20 equally spaced values. The first value should be 0, the last value
should be 2pi.
b. Fill a column vector y with 20 values. Each value of y should be equal to the corresponding value in
vector x times the sine of the corresponding value in x.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Blaer
 single matrix multiplication

Click to edit the document details