你好,代码供参考,有帮助望采纳哟
[x,y] = meshgrid(1:9); p = abs(x-y)<5 & abs(x+y-10)<5; plot(x(p), y(p), 'bp') axis([-1,11,0,10],'equal')