最近在练习线性拟合,缺少练习数据,可以通过 MATLAB 的 ginput() 函数来实现。 代码如下: clear;close all;clc imshow(ones(500, 500)); [x y]=ginput()