Hello,
Please help me...
I need to add 16 parity bits in matlab to a binary message, in order to form an error detection code C, transmit the message through the AWGN and after check the syndrome of code C.
Can you please help me?
Here is the code that I am using:
clear
N = 100; %number of bits
trellis=poly2trellis(7,[171 133]); % generator polynomial
bits = randint(N,1);% 1s and 0s for random bits
generator = crc.generator('0x8005');% crc-16 generator
detection = crc.detector('0x8005');% crc-16 detector
encoded_crc = generate(generator, bits);%crc addition
encoded_conv = convenc(encoded_crc,trellis);%convolutional encoding
modulated = 1-2*encoded_conv;%modulation
rx = awgn(modulated, -10);%pass through channel, AWGN, SNR=-10 dB
decoded = vitdec(rx,trellis,32,'trunc','unquant');%Viterbi decoding
decoded_crc = detect(detection,decoded);%CRC detection
new_crc = generate(generator,decoded_crc);%Generation of new CRC
num_of_err = length(find(new_crc~=decoded)) %comparing the new CRC with the received one
What is wrong with the code? when I compare the new CRC coded message with the one that I receive(without removing the CRC), it gives me 8 errors. Does this mean that the CRC is incorrect? How can I check the SYNDROME of CRC???
Thank you
PLEASE HELP...
|
|
0
|
|
|
|
Reply
|
Anna
|
3/30/2010 3:48:02 PM |
|
|
0 Replies
607 Views
(page loaded in 0.018 seconds)
Similiar Articles: CRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ...8 Bit CRC - comp.compression... CRC-32 checksum - comp.compression CRC, add 16 parity bits ... line argument, and prints out * its 16-bit Cyclic Redundancy Check ... 8 Bit CRC - comp.compressionCRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ... 8 Bit CRC - comp.compression About CRC-32 checksum - comp.compression CRC, add 16 parity bits in MATLAB ... Comparing two matrix in simulink - comp.soft-sys.matlabCRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ..... rate with crc-16 ... have come across the same Simulink ... Need help comparing two SSE2 registers - comp ... About CRC-32 checksum - comp.compressionhow to assign a NaN? - comp.lang.fortran 8 Bit CRC - comp.compression About CRC-32 checksum - comp.compression CRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ... how to assign a NaN? - comp.lang.fortran8 Bit CRC - comp.compression About CRC-32 checksum - comp.compression CRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ... how to assign a NaN? - comp.lang.fortran ... Examples of C++ in Safety Critical Systems - comp.lang.c++ ...CRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ..... About CRC-32 checksum - comp.compression ... 16 bit two's complement - comp.soft-sys.matlab... it appears ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... fopen() file size limitation - comp.unix.programmerI meant to add "Or build your app as a 64-bit one", but forgot to before I ... Reading Large files - comp.soft-sys.matlab fopen ... 7/5/2012 1:20:16 PM Need a FORTRAN compiler for Win7 (or XP) - comp.lang.fortran ...Or, you might need to add some EXTERNAL ... feature of 7090 WATFOR was the use of parity bits to ... 64-bit fortran compiler - comp.soft-sys.matlab ..... windows 7 64-bit ... how to transpose large matrix? - comp.unix.shellWhile on 64-bit machines with enough RAM a ... names[i] s[i]=FS } } END{ # add ... Replacing NaN with zeros - comp.soft-sys.matlab ... Generating a parity ... CRC, add 16 parity bits in MATLAB - comp.soft-sys.matlab ...8 Bit CRC - comp.compression... CRC-32 checksum - comp.compression CRC, add 16 parity bits ... line argument, and prints out * its 16-bit Cyclic Redundancy Check ... CRC, add 16 parity bits in MATLAB - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community 7/20/2012 3:31:50 AM
|