Rate distortion function calculation matlab program - information theory