This preview shows pages 1–2. Sign up to view the full content.
CMPE 8
NAME:
Fall 2008 Quiz 1
Quiz Time: 12:05–12:35 PM
1. (5 points) Write the Matlab commands to generate a time vector
t
that starts with
0.002, ends with 2, and has a sample period of 0.002.
±
t
= [0
.
002 : 0
.
002 : 2];
2. (6 points) For the time vector
t
deﬁned above, what are: a)
t
(3), and b)
t
(5)? You
can just write the numeric answer.
a) 0.006
b) 0.01
c) (Bonus  2 points) What is
t(end2)
?
1.996
3. (6 points) For the time vector
T
, deﬁned in Matlab as
±
T
= [

0
.
1
,
0
.
1
,
0
.
3
,
0
.
5
,
0
.
7
,
0
.
9
,
1
.
1];
what are: a) the end time, and b) the sample period? You can just write the numeric
answer.
a) 1.1
b) 0.2
c) (Bonus  2 points) What is a shorthand way of writing
T
using “ : ”?
±
T
= [

0
.
1 : 0
.
2 : 1
.
1];
4. (8 points) Deﬁne what a vector is, and deﬁne the dimension of a vector.
A vector is a ﬁnite and ordered sequence of numbers, called elements. The dimension
of a vector is the number of elements in the vector. The dimension is also known as
the length of the vector.
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.
 Fall '08
 DUNBAR

Click to edit the document details