Simulation of a general (not necessarily symmetric) binary channel in MATLAB.
gbc.m is a function that receives any real-valued matrix (not necessarily binary) and returns it after the general binary channel. The error probabilities p and q represent the probability of the binary code to change from 1 to 0 and from 0 to 1, respectively.
Binary_Channel_Simulation.m is a script that uses gbc.m to simulate the image ForbiddenCity.png after the binary channel for p and q both ranging between 0 and 1. Results.png is a collage of all resulting images together.