{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ProakisSalehi_9.25MATLABSolution

# ProakisSalehi_9.25MATLABSolution - EXERCISE 9.25 OUTPUT H =...

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

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)) *****************************************************
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

{[ snackBarMessage ]}

Ask a homework question - tutors are online