Professional Documents
Culture Documents
>> stairs(pesan_kirim) >> xlabel('Jumlah Bit Pesan'); >> ylabel('Amplitudo Bit Pesan'); >> title('Bit Pesan Yang Dikirim');
2. Proses Pengkodean (Encoder) >> t=poly2trellis(3,[6,7]); >> codeword=convenc(pesan_kirim,t); >> codeword' ans =
1 Atau >> stem(pesan_kirim) >> xlabel('Jumlah Bit Pesan') >> ylabel('Amplitudo Bit Pesan') >> title('Bit Pesan Yang Dikirim') 1 1 1 1
0 0 0 1 0 1 0 1 1 0 1 Tampilan Hasil Pengkodean : >>stairs(codeword); >> ylabel('Amplitudo Codeword'); >> xlabel('Jumlah Bit Codeword'); >> title('Bit Hasil Pengkodean');
Atau >> stem(codeword); >> ylabel('Amplitudo Codeword'); >> xlabel('Jumlah Bit Codeword ); >> title('Bit Hasil Pengkodean');
3. Dekoder (Pengkodean Kembali) >> tb=2; >> pesan_terima=vitdec(codeword,t,tb,'trunc',' hard') pesan_terima = 0 >> pesan_terima' ans = 1 0 1 1 0 1 1 0 1 0
1 0 1 0 0
ratio_biterr = 0.2500
>> [jml_biterr,ratio_bitter]=biterr(pesan_terima,pe san_kirim) jml_biterr = 0 ratio_bitter = 0 >> pesan_kirim=[1 0 1 1 0 1 0 0]; >> t=poly2trellis(3,[6 7]); >> codeword=convenc(pesan_kirim,t); >> N=length(codeword); >> var=0.4; >> noise=var*randn(N,1); >> neoden=xor(codeword,noise') neoden = Columns 1 through 10