clear allclcx=[1 2 3 4 5 6 7];y=[1 6 3 7 3 9 1];plot(x,y)f = figure(1);rect= getrect(f); %取得坐标text(rect(1),rect(2),num2str(rect))