Assessment 3
Assessment 3
Table of Contents
Question one part a .............................................................................................................................. 1
Question one part b ............................................................................................................................. 1
Question one part c .............................................................................................................................. 1
Question two part a ............................................................................................................................. 1
Question two part b,c & d ..................................................................................................................... 2
Question three .................................................................................................................................... 4
21 is an odd number
a =
1
Assessment 3
1 2 3 4 5 6 7 8 9 10
b =
Columns 1 through 3
Columns 4 through 6
Columns 7 through 9
Column 10
0.000976562500000
c =
0.999023437500000
% Matlab gives an error when you use an array of 10 ones because the
% program needs all the arrays of the plot to have the same dimension so I
changed the array
% to have the same number of ones as elements has "n" (I did this to make
the program as universal as possible).
y=ones (1,length(n)); %creates a lists of 20 ones.
2
Assessment 3
% From the plot we can deduce that the bigger the value of "a" is, the more
% the function approaches 1. So the value of the limit when n tends to
infinity would be
% 1.
S =
Columns 1 through 3
Columns 4 through 6
Columns 7 through 9
Columns 10 through 12
Columns 13 through 15
Columns 16 through 18
Columns 19 through 20
0.999998092651367 0.999999046325684
S_n =
0.999999046325684
n =
Columns 1 through 13
3
Assessment 3
1 2 3 4 5 6 7 8 9 10 11 12
13
Columns 14 through 20
14 15 16 17 18 19 20
Question three
x=[1 9 7 6 3 0 8 7 5 2 1 6]
y=3
x =
1 9 7 6 3 0 8 7 5 2 1 6
4
Assessment 3
y =