MATLAB Answers

to plot BER curve for IDWT

4 views (last 30 days)
ABDUL on 16 Oct 2020
Edited: ABDUL on 16 Oct 2020
i am not able to plot the proper ber curve .this is my piece of code which is attached for your reference
clear all;
close all;
PSK = 4; SNR = -5;
M_rx = 1; % No. of Rx antennas
SNRs = -50:20; % signal-to-noise ratios: -10dB … 20dB
bit_errors = zeros(length(SNRs), 1); % BER with respect to SNR
%implementation of the The transmitter
data = randi([0 PSK-1],64,1000);
symbol = pskmod(data, PSK, 0, 'Gray');
% symbol = qammod(data, PSK, 0, 'Gray');
%to Perform parallel to serial conversion
%to perform IDWT operation
AC =pstx; %% approximation coefficients
DC = zeros(size(pstx));%% detailed (wavelet) coefficients
IDWT=idwt(AC,DC,'haar').';% IDWT process
%implementation of the receiver
for SNR_idx = 1:length(SNRs)
received_symbol = awgn(IDWT, SNRs(SNR_idx)).';
[ca cd]=dwt(received_symbol,'haar' );
%to perform parallel to serial conversion
estimated_data = pskdemod(psrx, PSK, 0, 'Gray');
% estimated_data = qamdemod(received_symbol, PSK, 0, 'Gray');
[no_of_error(SNR_idx), bit_errors(SNR_idx)]=biterr(data,estimated_data);
semilogy(SNRs , bit_errors); % plot with logarithmic y-axis
grid on; % show a grid
xlabel('SNR [dB]');
ylabel('BER'); % label x- and y-axis
ABDUL on 16 Oct 2020
hi raymond ... i am not getting the graph correctly ..
this is the graph what i am getting it ... is there any possible way to plot the graph correctly

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by