% MATLAB script for ECS 452 by Asst. Prof. Dr. Prapun Suksompong.

close all; clear all;
tic

%% Simulation parameters
% The number of symbols to be transmitted
n = 1e4; 
% Binary Assymmetric Channel (BAC)
% Ex 3.8 in lecture note (11.3 in [Z&T, 2010])
% Channel Input 
S_X = [0 1]; S_Y = [0 1];
p_X = [0.5 0.5];
% Channel Characteristics
Q = [0.7 0.3; 0.4 0.6];

%% 
% Generate the Channel input, apply DMC channel to generate the channel 
% output, show statistical analysis, use naive decoder, and find error
% probability

DMC_Analysis_demo

toc

