Professional Documents
Culture Documents
EX1A Answers
EX1A Answers
Starting
a)
a. 1.0323
b. -0.6459
c. 0.6781
b)
a. 20.0855
3.0000
1.3029
5.0000
b. 2.6254e+017
c. 2.5789
c)
x = 1 2 3 4 5
Output vectors:
a. 2.0000 1.3333 1.1429 1.0667 1.0323
b. -1.0000 -0.7868 -0.7058 -0.6667 -0.6459
d)
a.
b.
1 4 9 16 25 36 49 64 81 100
b) Sum = 5050
c) P = 101
d) n = 50
e) P*N = 5050
f) Sum = 45150
3. Going diagonal
a)
theta =
0 1 2 3 4 5 6
X =
Y =
e) Combine the answers from a) and c) and put them in the function.
The vectors X and Y should not change using this function.
[X,Y]=circ(5);
plot(X,Y);
5. Got it!
ans =
1 0 0 1
0 1 0 5
0 0 1 25
0 0 0 0
0 0 0 0
f)
ans =
1.0000
5.0000
25.0000