Rename it to LPDC_encoder.m and added some error handlings