fixed small bug with matlab codegen. added userguide tex document