salut
je doit faire une étude de performance de 8 PSK
mais le logiciel ne fonctionne pas .voila le message d'erreur
"??? Error using ==> berconfint at 25
NERRS cannot exceed NTRIALS."
voila le programme : (de help )
% Set up initial parameters.
siglen = 1000; % Number of bits in each trial
M = 2; % DBPSK is binary.
EbNomin = 0; EbNomax = 10; % EbNo range, in dB
numerrmin = 5; % Compute BER only after 5 errors occur.
EbNovec = EbNomin:1:EbNomax; % Vector of EbNo values
numEbNos = length(EbNovec); % Number of EbNo values
% Preallocate space for certain data.
ber = zeros(1,numEbNos); % BER values
intv = cell(1,numEbNos); % Cell array of confidence intervals
% Loop over the vector of EbNo values.
for jj = 1:numEbNos
EbNo = EbNovec(jj);
snr = EbNo; % Because of binary modulation
ntrials = 0; % Number of passes through the while loop below
numerr = 0; % Number of errors for this EbNo value
% Simulate until numerrmin errors occur.
while (numerr < numerrmin)
msg = randint(siglen, 1, M); % Generate message sequence.
txsig = dpskmod(msg,M); % Modulate.
rxsig = awgn(txsig, snr, 'measured'); % Add noise.
decodmsg = dpskdemod(rxsig,M); % Demodulate.
newerrs = biterr(msg,decodmsg); % Errors in this trial
numerr = numerr + newerrs; % Total errors for this EbNo value
ntrials = ntrials + 1; % Update trial index.
end
% Error rate and 98% confidence interval for this EbNo value
[ber(jj), intv1] = berconfint(numerr,(ntrials * siglen),.98);
intv{jj} = intv1; % Store in cell array for later use.
disp(['EbNo = ' num2str(EbNo) ' dB, ' num2str(numerr) ...
' errors, BER = ' num2str(ber(jj))])
end
% Use BERFIT to plot the best fitted curve,
% interpolating to get a smooth plot.
fitEbNo = EbNomin:0.25:EbNomax; % Interpolation values
berfit(EbNovec,ber,fitEbNo);
% Also plot confidence intervals.
hold on;
for jj=1:numEbNos
semilogy([EbNovec(jj) EbNovec(jj)],intv{jj},'g-+');
end
hold off;
j'ai change M= 2 par M=8 ,il marche pas
mais quand je la change par 5 or 4 'un entier de 2 jusqu'à 6 il marche
comment je fais ??
je doit faire un compte rendu pour le vendredi
merci a vous
-----