function cosine_realisations(N)
% C.E. Powell, MATH64082
% Function to generate realisations of the RF in Example 1.23 (Figure 4). 
% N = no. of samples of plot.

h=2*pi/1000;
xx=0:h:2*pi; % choose values of x

figure(10);
for i=1:N
    xi=randn(1,2);
    a=xi(1).*cos(xx) + xi(2).*sin(xx);
    plot(xx,a); hold on;
end
axis([0,2*pi,-5,5]);
xlabel('x'); 
    