clc;clear; t1 = [0:0.1:0.9]; y1 = t1; t2 = [-1:0.1:-0.1]; y2 = -t2; t = [t1,t2]; y = [y1,y2]; t = [-9:0.1:8.9]; y = repmat(y,1,9); plot(t,y) axis([-10 10 -2 3]).
zhidao.baidu.com