It will be helpful if you can explain what workflow are you trying to achieve? Do you need to just plot a line on the image? Or the requirement is to highlight a line segment extracted by HOUGHLINES function?
Case 1: To draw a line on an image can be done from the code below:
img = imread('autumn.tif');
Case 2: If you want to extract line segments based on Hough transform using HOUGHLINES and highlight them by drawing a line on the plotted image, please follow the example mentioned in the link below:
If this does not resolve your issue, please create a Technical Support Request by visiting the link below: