ProakisSalehi_9.25MATLABSolution

ProakisSalehi_9.25MATLABSolution - *************** EXERCISE...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
clear all; clc % *************** EXERCISE 9.25 *************** % Define Hamming code parameters n = 15; k = 11; m = n - k; % Create generator, (G) and parity-check, (H) matrices P = [1 1 1 1; 1 1 1 0; 0 1 1 1; 1 1 0 1; 1 0 1 1; 1 1 0 0; 0 1 1 0; 0 0 1 1; 1 0 0 1; 1 0 1 0; 0 1 0 1]; % DISPLAY EXERCISE 9.25 OUTPUT disp(sprintf('*****************************************************')) disp(sprintf('*************** EXERCISE 9.25 OUTPUT ****************\n')) H = [P' eye(m)] disp(sprintf('\n\n\n')) G = [eye(k) P] disp(sprintf('\n\n\n')) disp(sprintf('G*H'':')) disp(mod(G*H', 2)) *****************************************************
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: *************** EXERCISE 9.25 OUTPUT **************** H = 1 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 0 0 1 G = 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 G*H': 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
View Full Document

This note was uploaded on 08/05/2008 for the course ELEN E4702 taught by Professor Lazano during the Summer '08 term at Columbia.

Ask a homework question - tutors are online