Mathworks Poly2trellis, I have no idea how to implement it.