% Simulates a simple gaussian process 
%
% X(t) = A0 + sum Ak cos(2 pi fk t + phik)
%

                     %only two terms here
f = [5 10];          % frequencies
sigma2_ = [2 2];     % energy at these frequencies
N = 500;             % number of simulations
dt = 1/(2*max(f))/3; % sampling interval
t = 0:dt:20;         % time
fprintf('Frequencies:\n')
disp(num2str(f))
fprintf('Energies:\n')
disp(num2str(sigma2_))
fprintf('Maximal frequency in sampled signal: %0.5g Hz\n',1/(2*dt))
     
fprintf('Sampling interval: %0.5g sek\n',dt)
[rayamp]=enkelsumma(f,sigma2_,N,t);
%
% For use in  spekgui
clear data
data.x = rayamp(:,5);
data.dt = dt;
