I observed that its when i use "hEnc = comm.LDPCEncoder(H); and hDec = comm.LDPCDecoder(H);" that the decoder introduces errors. I used this because I got an error message which I could not understand while using the following you recommended:
here is the error message I got, which I have since been unable to resolve:
Error using tf (line 293) The values of the "num" and "den" properties must be row vectors or cell arrays of row vectors, where each vector is nonempty and containing numeric data. Type "help tf.num" or "help tf.den" for more information.
Error in step (line 97) sys = tf(a,b);
Error in wild (line 42) BCHFEC=step(henc,BBframe);