摘要: x = 1:10; h = zeros(4); for i = 1:4 y = i*x; h(i) = plot(x,y); hold on end legend(h([1,2,3,4]),'y1','y2','y3','y4') hold off 在 for 循环中根据循环改变 legend,效果 阅读全文
posted @ 2018-11-17 17:21 qinghev 阅读(7094) 评论(3) 推荐(0) 编辑