function [p]=ss_Pe94(snr_in_dB, Lc, A, w0)
% [p]=ss_Pe94(snr_in_dB, Lc, A, w0)
% SS_PE94 finds the measured error rate. The function
% that returns the measured probability of error for the given value of
% the snr_in_dB, Lc, A and w0.
sgma=1; % Noise standard deviation is fixed.
Eb=2*sgma^2*snr; % signal level required to achieve the given
% signal-to-noise ratio
E_chip=Eb/Lc; % energy per chip
N=10000; % number of bits transmitted
% The generation of the data, noise, interference, decoding process and error
% counting is performed all together in order to decrease the run time of the
% program. This is accomplished by avoiding very large sized vectors.
% Generate the next data bit.
% Repeat it Lc times, i.e. divide it into chips.
% pn sequence for the duration of the bit is generated next
% the transmitted signal is
% AWGN with variance sgma^2
% received signal
% Determine the decision variable from the received signal.
% making decision
% If it is an error, increment the error counter.
% then the measured error probability is