Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
10.Block Code Generation

10.Block Code Generation

Ratings: (0)|Views: 23|Likes:
Published by Shathis Kumar

More info:

Published by: Shathis Kumar on May 04, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

06/08/2015

pdf

text

original

 
EXNO: 10(a)
BLOCK CODE GENERATIONMATLAB PROGRAM:
clc;clear;w=[1 0 0 0 1 0];
fprintf(‘The original code is:’);
 disp(w);P=[1 1 0; 0 1 1; 0 0 1];I=[1 0 0; 0 1 0; 0 0 1];pt=P`;H=[pt,I];
ht=H’;
 disp(ht);for(i=1:3)s1=0;for(j=1:6)s1xor(s1,ht(j,i)*w(j));ends(i)=s1;end
fprint(‘The syndrome is:’);
 disp(s);for(k=1:6);if(s==ht(k,:))temp=k;
 
endend
fprintf(‘The error is in the position %d
 \ 
n’,temp);
 w(temp)=xnor(w(temp),1);
disp(‘Corrected code is:’);
 disp(w)OUTPUTThe original code is: 1 0 0 0 1 01 1 00 1 10 0 11 0 00 1 00 0 1The syndrome is: 1 0 0The error is in the position 4Corrected code is:1 0 0 1 1 0
 
EXNO: 10(b)
ASK, FSK, PSK GENERATION
 MATLAB PROGRAM:AMPLITUDE SHIFT KEYING
clc;fc=5;fd=5;fs=50;m=4;x=[ones(3,1);zeros(3,1);ones(3,1)];
[y,t]=dmod(x,fc,fd,fs,’ask’,m);
 
 plot(t,y,’k’);
 
ylabel(‘AMPLITUDE
---
>’);
 
xlabel(‘TIME
---
>’);
 
title(‘AMPLITUDE SHIFT KEYING’);
 
FREQUENCY SHIFT KEYING
clc;fc=5;fsi=5;fso=100;m=2;x=[ones(3,1);zeros(2,1);ones(2,1)];
[y,t]=dmod(x,fc,fsi,fso,’fsk’,m);
 
 plot(t,y,’k’);
 

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->