如何从roi中提取x1,y1,x2,y2。匹配变量(x1,y1,x2,y2(的位置?
function drawLineButtonPushed(app, event)
roi = drawline(app.myAxes)
disp(roi.Position);
end
drawline
允许用户在所选轴上绘制连接两点A
和B
的线。A
([Ax Ay]
(和B
([Bx By]
(的XY位置简单地为:
roi = drawline(app.myAxes);
Ax = roi.Position(1);
Bx = roi.Position(2);
Ay = roi.Position(3);
By = roi.Position(4);