Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Bit Error Rate High Values

3 visualizaciones (últimos 30 días)
Kawther
Kawther el 1 de Dic. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Dear All,
I am using this code to find the bit error rate for the Kmeans clustering algorithm for receving a QPSK modulated data. Running the code high BER values are obtained (something more than 80). Can anyone help me with that ASAP.
clear all
clc
T=[ 2+2*i 2-2*i -2+2*i -2-2*i];
A=randn(150,2)+2*ones(150,2); C=randn(150,2)-2*ones(150,2);
B=randn(150,2)+2*ones(150,2); F=randn(150,2)-2*ones(150,2);
D=randn(150,2)+2*ones(150,2); G=randn(150,2)-2*ones(150,2);
E=randn(150,2)+2*ones(150,2); H=randn(150,2)-2*ones(150,2);
X = [A; B; D; C; F; E; G; H];
for k=1:5
[idx, centroids] = kmeans(X, k, 'Replicates', 20);
x = X(:,1);
y = X(:,2);
BER=[];
for nn=1:4
ber=0;
gt = zeros(1,4);
for idx = 1 : 4
[dummy,gt(idx)] = min(sum(bsxfun(@minus, [real(T(idx)), imag(T(idx))],...
centroids).^2, 2));
end
randn('seed',123);
rand_ind = randi(4, 10, 1);
test_sequence = T(rand_ind);
gt_labels = gt(rand_ind);
x = real(test_sequence).*(nn*randn(1, 10));
y = imag(test_sequence).*(nn*randn(1, 10));
labels = zeros(1, 10);
for idx = 1 : 10
[dummy,labels(idx)] = min(sum(bsxfun(@minus, [x(idx), y(idx)],...
centroids).^2, 2));
end
ber = sum(labels ~= gt_labels) / 10 * 100;
BER=[BER ber];
end
plot(nn,BER)
end
Thank you very much. Kawther

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by