از تابع improfile به صورت زیر استفاده کنید:
I = imread('liftingbody.png'); x = [19 427 416 77]; y = [96 462 37 33]; improfile(I,x,y)