用getrect()函数看看行吗! GETRECT Select rectangle with mouse. RECT = GETRECT(FIG) lets you select a rectangle in the current axes of figure FIG using the mouse. Use the mouse to click and drag the desired rectangle. RECT is a four-element vector with the form [xmin ymin width height]. To constrain the rectangle to be a square, use a shift- or right-click to begin the drag.
RECT = GETRECT(AX) lets you select a rectangle in the axes specified by the handle AX.