% 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; 
% General DMC
% Ex. 3.16 in lecture note
% Channel Input 
S_X = [0 1]; S_Y = [1 2 3];
p_X = [0.2 0.8];
% Channel Characteristics
Q = [0.5 0.2 0.3; 0.3 0.4 0.3];

%% 
% 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

